18 lines
568 B
C#
18 lines
568 B
C#
using DBConnection.Models;
|
|
|
|
namespace DBConnection.Repositories.Interfaces;
|
|
|
|
public interface IRepository
|
|
{
|
|
|
|
}
|
|
|
|
public interface IRepository<TEntityType> : IRepository where TEntityType : BaseEntity
|
|
{
|
|
TEntityType Delete(TEntityType entity);
|
|
Task<TEntityType> Upsert(TEntityType entity);
|
|
Task<TEntityType?> GetIncluded(TEntityType entity);
|
|
Task<TEntityType?> GetIncluded(Func<TEntityType, bool> predicate);
|
|
Task<IEnumerable<TEntityType>> GetWhereIncluded(Func<TEntityType, bool> predicate);
|
|
Task<IEnumerable<TEntityType>> GetAllIncluded();
|
|
} |