20 lines
685 B
C#
20 lines
685 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.Extensions.Logging;
|
|
using PARR.DAL.Context;
|
|
using PARR.DAL.Models.Unit;
|
|
using PARR.DAL.Repositories.Base;
|
|
using PARR.DAL.Services.Interfaces.Unit;
|
|
|
|
namespace PARR.DAL.Services.Implementations.Unit
|
|
{
|
|
internal class UnitFieldService : BaseRepository<UnitField>, IUnitFieldService
|
|
{
|
|
public UnitFieldService(DataContext dataContext, ILogger<UnitFieldService> logger) : base(logger, dataContext) { }
|
|
|
|
public async Task<UnitField?> GetByAihitNameAsync(string name)
|
|
{
|
|
return await EntitySet.FirstOrDefaultAsync(uf => uf.AihitName.ToLower().Trim() == name.ToLower().Trim());
|
|
}
|
|
}
|
|
}
|