Merge branch 'develop' of github.com:Frappet/BMA-EHR-BackEnd into develop

This commit is contained in:
Kittapath 2024-07-11 00:02:51 +07:00
commit 9dd0f1e037
5 changed files with 37 additions and 17 deletions

View file

@ -91,8 +91,15 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
if (entity.LeaveDraftDocument != null)
_dbContext.Attatch(entity.LeaveDraftDocument);
// if (entity.LeaveDocument != null)
// _dbContext.Attatch(entity.LeaveDocument);
if (entity.LeaveDocument != null)
{
foreach(var d in entity.LeaveDocument)
{
_dbContext.Attatch(d);
}
}
if (entity.Type != null)
_dbContext.Attatch(entity.Type);
@ -108,8 +115,14 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
if (entity.LeaveDraftDocument != null)
_dbContext.Attatch(entity.LeaveDraftDocument);
// if (entity.LeaveDocument != null)
// _dbContext.Attatch(entity.LeaveDocument);
if (entity.LeaveDocument != null)
{
foreach (var d in entity.LeaveDocument)
{
_dbContext.Attatch(d);
}
}
if (entity.Type != null)
{