Add support for multiple child DNA IDs in leave processing and enhance batch creation of duty time changes
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m45s
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m45s
This commit is contained in:
parent
6427cb4344
commit
aef81e9f4e
5 changed files with 81 additions and 16 deletions
|
|
@ -68,6 +68,24 @@ namespace BMA.EHR.Application.Repositories.Leaves
|
|||
return entity;
|
||||
}
|
||||
|
||||
public virtual async Task<IReadOnlyList<T>> AddRangeAsync(List<T> entities)
|
||||
{
|
||||
foreach (var entity in entities)
|
||||
{
|
||||
if (entity is EntityBase)
|
||||
{
|
||||
(entity as EntityBase).CreatedUserId = UserId ?? "";
|
||||
(entity as EntityBase).CreatedFullName = FullName ?? "System Administrator";
|
||||
(entity as EntityBase).CreatedAt = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
await _dbSet.AddRangeAsync(entities);
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
||||
return entities;
|
||||
}
|
||||
|
||||
public virtual async Task<T> UpdateAsync(T entity)
|
||||
{
|
||||
if (entity is EntityBase)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue