Add Report V2 เพื่อทดสอบการสสร้างตัว generate report ด้วย dotnet 6
This commit is contained in:
parent
c179b14839
commit
63403121ae
220 changed files with 3105 additions and 483 deletions
|
|
@ -7,19 +7,59 @@ namespace BMA.EHR.Application.Repositories
|
|||
{
|
||||
public class PlacementRepository : GenericRepository<Guid, Placement>
|
||||
{
|
||||
#region " Fields "
|
||||
|
||||
private readonly IApplicationDBContext _dbContext;
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
#endregion
|
||||
|
||||
#region " Constructor and Destructor "
|
||||
|
||||
public PlacementRepository(IApplicationDBContext dbContext, IHttpContextAccessor httpContextAccessor) : base(dbContext, httpContextAccessor)
|
||||
{
|
||||
_dbContext = dbContext;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region " Methods "
|
||||
|
||||
public async Task<List<Placement>> GetCompetitivePlacementAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
var data = await _dbContext.Set<Placement>()
|
||||
.Include(p => p.PlacementType)
|
||||
.Where(p => p.PlacementType.Name == "สอบแข่งขัน")
|
||||
.ToListAsync();
|
||||
|
||||
return data;
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<List<Placement>> GetQualifyingPlacementAsync()
|
||||
{
|
||||
var data = await _dbContext.Set<Placement>()
|
||||
.Include(p => p.PlacementType)
|
||||
.Where(p => p.PlacementType.Name != "สอบแข่งขัน")
|
||||
.ToListAsync();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Placement>> FindByNameAsync(string name)
|
||||
{
|
||||
var data = await _dbContext.Set<Placement>().Where(x => x.Name == name).ToListAsync();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue