จัดระเบียบ Code ใหม่ และเพิ่ม Extension Method
implement GenericRepository Class ใหม่
This commit is contained in:
parent
e49c6a4aca
commit
89de09d213
21 changed files with 1439 additions and 63 deletions
|
|
@ -26,6 +26,8 @@ namespace BMA.EHR.Application.Common.Interfaces
|
|||
|
||||
#endregion
|
||||
|
||||
DbSet<T> Set<T>() where T : class;
|
||||
|
||||
Task<int> SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue