hrms-api-backend/BMA.EHR.Application/Common/Interfaces/IGenericRepository.cs

20 lines
385 B
C#
Raw Permalink Normal View History

2023-06-25 18:36:02 +07:00
using BMA.EHR.Domain.Common;
using Microsoft.AspNetCore.Http;
2023-06-25 18:36:02 +07:00
namespace BMA.EHR.Application.Common.Interfaces
2023-06-05 20:22:51 +07:00
{
public interface IGenericRepository<S, T> where T : class
{
Task<T?> GetByIdAsync(S id);
2023-06-05 20:22:51 +07:00
Task<IReadOnlyList<T>> GetAllAsync();
Task<T> AddAsync(T entity);
Task<T> UpdateAsync(T entity);
Task DeleteAsync(T entity);
}
2023-06-05 20:22:51 +07:00
}