22 lines
728 B
C#
22 lines
728 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using _0_Framework.InfraStructure;
|
|
using Company.Domain.EmployeeAuthorizeTempAgg;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace CompanyManagment.EFCore.Repository;
|
|
|
|
public class EmployeeAuthorizeTempRepository:RepositoryBase<long,EmployeeAuthorizeTemp>, IEmployeeAuthorizeTempRepository
|
|
{
|
|
private readonly CompanyContext _context;
|
|
public EmployeeAuthorizeTempRepository(CompanyContext context) : base(context)
|
|
{
|
|
_context = context;
|
|
}
|
|
|
|
public async Task<EmployeeAuthorizeTemp> GetByNationalCode(string nationalCode)
|
|
{
|
|
return await _context.EmployeeAuthorizeTemps.FirstOrDefaultAsync(x =>
|
|
x.NationalCode == nationalCode);
|
|
}
|
|
} |