26 lines
971 B
C#
26 lines
971 B
C#
using BMA.EHR.Application.Common.Interfaces;
|
|
using BMA.EHR.Domain.Models.MetaData;
|
|
using BMA.EHR.Domain.Models.OrganizationEmployee;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace BMA.EHR.Application.Repositories
|
|
{
|
|
public class OrganizationEmployeeRepository : GenericRepository<Guid, OrgEmployee>
|
|
{
|
|
private readonly IApplicationDBContext _dbContext;
|
|
private readonly IHttpContextAccessor _httpContextAccessor;
|
|
public OrganizationEmployeeRepository(IApplicationDBContext dbContext, IHttpContextAccessor httpContextAccessor) : base(dbContext, httpContextAccessor)
|
|
{
|
|
_dbContext = dbContext;
|
|
_httpContextAccessor = httpContextAccessor;
|
|
}
|
|
|
|
public async Task<IEnumerable<OrgEmployee>> FindByIdAsync(Guid id)
|
|
{
|
|
var data = await _dbContext.Set<OrgEmployee>().Where(x => x.Id == id).ToListAsync();
|
|
|
|
return data;
|
|
}
|
|
}
|
|
}
|