fix Синхронизации
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models.V1;
|
||||
using PARR.DAL.Services.Abstracts;
|
||||
using PARR.DAL.Services.Interfaces.V1;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations.V1
|
||||
{
|
||||
internal class V1_ApplicationService : BaseService<V1_Application>, V1_IApplicationService
|
||||
{
|
||||
private readonly DataContext dataContext;
|
||||
private readonly ILogger<V1_ApplicationService> logger;
|
||||
|
||||
public V1_ApplicationService(DataContext dataContext, ILogger<V1_ApplicationService> logger) : base(logger)
|
||||
{
|
||||
this.dataContext = dataContext;
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
protected override DbSet<V1_Application> EntitySet => dataContext.V1_Applications;
|
||||
|
||||
protected override DataContext EntitiContext => dataContext;
|
||||
|
||||
public async Task<V1_Application?> GetByNameAsync(string appName)
|
||||
{
|
||||
return await EntitySet.FirstOrDefaultAsync(t => t.Name.ToLower() == appName.Trim().ToLower());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user