2025-05-14 15:13:30 +10:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
|
using PARR.DAL.Context;
|
|
|
|
|
|
using PARR.DAL.Models.Unit;
|
2026-04-14 09:56:31 +10:00
|
|
|
|
using PARR.DAL.Repositories.Base;
|
2025-05-14 15:13:30 +10:00
|
|
|
|
using PARR.DAL.Services.Interfaces.Unit;
|
|
|
|
|
|
|
|
|
|
|
|
namespace PARR.DAL.Services.Implementations.Unit
|
|
|
|
|
|
{
|
2026-04-14 09:56:31 +10:00
|
|
|
|
internal class UnitFieldService : BaseRepository<UnitField>, IUnitFieldService
|
2025-05-14 15:13:30 +10:00
|
|
|
|
{
|
2026-04-14 09:56:31 +10:00
|
|
|
|
public UnitFieldService(DataContext dataContext, ILogger<UnitFieldService> logger) : base(logger, dataContext) { }
|
2025-05-19 16:09:55 +10:00
|
|
|
|
|
|
|
|
|
|
public async Task<UnitField?> GetByAihitNameAsync(string name)
|
|
|
|
|
|
{
|
2025-05-21 16:50:00 +10:00
|
|
|
|
return await EntitySet.FirstOrDefaultAsync(uf => uf.AihitName.ToLower().Trim() == name.ToLower().Trim());
|
2025-05-19 16:09:55 +10:00
|
|
|
|
}
|
2025-05-14 15:13:30 +10:00
|
|
|
|
}
|
|
|
|
|
|
}
|