Receive and Deploy Command

This commit is contained in:
Suphonchai Phoonsawat 2023-07-28 15:04:26 +07:00
parent 297b1efb57
commit 4e8b7ea32b
24 changed files with 49003 additions and 87 deletions

View file

@ -37,17 +37,17 @@ namespace BMA.EHR.Application.Repositories
#region " Methods "
public async Task<IReadOnlyList<T>> GetAllAsync()
public virtual async Task<IReadOnlyList<T>> GetAllAsync()
{
return await _dbSet.ToListAsync();
}
public async Task<T?> GetByIdAsync(S id)
public virtual async Task<T?> GetByIdAsync(S id)
{
return await _dbSet.FindAsync(id);
}
public async Task<T> AddAsync(T entity)
public virtual async Task<T> AddAsync(T entity)
{
//if (entity is IAuditableEntity)
//{
@ -63,7 +63,7 @@ namespace BMA.EHR.Application.Repositories
return entity;
}
public async Task<T> UpdateAsync(T entity)
public virtual async Task<T> UpdateAsync(T entity)
{
//if (entity is IAuditableEntity)
//{
@ -78,7 +78,7 @@ namespace BMA.EHR.Application.Repositories
return entity;
}
public async Task DeleteAsync(T entity)
public virtual async Task DeleteAsync(T entity)
{
_dbSet.Remove(entity);
await _dbContext.SaveChangesAsync();