fix Синхронизации

This commit is contained in:
Mikhail Kuznetsov
2023-08-23 15:47:20 +10:00
parent 260a20e9bf
commit 906982d08d
59 changed files with 8462 additions and 2 deletions

View File

@@ -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());
}
}
}