สร้าง file api บรรจุ
This commit is contained in:
parent
d387cc68bc
commit
385d37c985
15 changed files with 2500 additions and 6 deletions
26
BMA.EHR.Application/Repositories/PlacementRepository.cs
Normal file
26
BMA.EHR.Application/Repositories/PlacementRepository.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using BMA.EHR.Application.Common.Interfaces;
|
||||
using BMA.EHR.Domain.Models.MetaData;
|
||||
using BMA.EHR.Domain.Models.Placement;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace BMA.EHR.Application.Repositories
|
||||
{
|
||||
public class PlacementRepository : GenericRepository<Guid, Placement>
|
||||
{
|
||||
private readonly IApplicationDBContext _dbContext;
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
public PlacementRepository(IApplicationDBContext dbContext, IHttpContextAccessor httpContextAccessor) : base(dbContext, httpContextAccessor)
|
||||
{
|
||||
_dbContext = dbContext;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Placement>> FindByNameAsync(string name)
|
||||
{
|
||||
var data = await _dbContext.Set<Placement>().Where(x => x.Name == name).ToListAsync();
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue