This commit is contained in:
parent
4ca6b7d842
commit
b90a0ad489
3 changed files with 13 additions and 2 deletions
|
|
@ -91,7 +91,9 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
|
||||
public override async Task<LeaveRequest?> GetByIdAsync(Guid id)
|
||||
{
|
||||
var data = await _dbContext.Set<LeaveRequest>().AsQueryable()
|
||||
try
|
||||
{
|
||||
var data = await _dbContext.Set<LeaveRequest>().AsQueryable()
|
||||
.AsNoTracking()
|
||||
.Include(x => x.Approvers)
|
||||
.Include(x => x.LeaveDocument)
|
||||
|
|
@ -101,7 +103,13 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
.Include(x => x.Type)
|
||||
.FirstOrDefaultAsync(x => x.Id == id);
|
||||
|
||||
return data;
|
||||
return data;
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public override async Task<LeaveRequest> AddAsync(LeaveRequest entity)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue