จัดระเบียบ Code ใหม่ และเพิ่ม Extension Method

implement GenericRepository Class ใหม่
This commit is contained in:
Suphonchai Phoonsawat 2023-06-26 10:15:50 +07:00
parent e49c6a4aca
commit 89de09d213
21 changed files with 1439 additions and 63 deletions

View file

@ -26,6 +26,8 @@ namespace BMA.EHR.Application.Common.Interfaces
#endregion
DbSet<T> Set<T>() where T : class;
Task<int> SaveChangesAsync();
}
}

View file

@ -1,10 +1,11 @@
using BMA.EHR.Domain.Common;
using Microsoft.AspNetCore.Http;
namespace BMA.EHR.Application.Common.Interfaces
{
public interface IGenericRepository<S,T> where T : class
{
Task<T?> GetByIdAsync(S id);
public interface IGenericRepository<S, T> where T : class
{
Task<T?> GetByIdAsync(S id);
Task<IReadOnlyList<T>> GetAllAsync();
}