Creado apartir del commit b888de6c92056de294456f581a56e25e734d4ab7 de develop
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using System.Linq.Expressions;
|
||||
using adas_core.Domain.Models.Filter;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace adas_core.Domain;
|
||||
|
||||
public interface IDefaultRepository<T, in TS> where T : class
|
||||
{
|
||||
DbSet<T> GetSet();
|
||||
IQueryable<T> Query();
|
||||
IQueryable<T> Query(PaginationFilter? filter);
|
||||
IQueryable<T> Query(int? currentPage, int? pageSize = null);
|
||||
|
||||
T? GetById(TS id, params Expression<Func<T, object>>[] includeExpressions);
|
||||
|
||||
T? GetById(TS id, QueryCustomizer<T> queryCustomizer);
|
||||
|
||||
/*[Obsolete("Use GetById(<S> id) instead")]
|
||||
T? GetById(int id);
|
||||
[Obsolete("Use GetById(<S> id) instead")]
|
||||
T? GetById(long id);
|
||||
//T? GetById(string id);*/
|
||||
T? GetByIds(params object[] keyValues);
|
||||
T Create(T obj);
|
||||
List<T> Create(List<T> objs);
|
||||
T Delete(T obj);
|
||||
List<T> Delete(ICollection<T> objs);
|
||||
void DeleteAll();
|
||||
T Update(T obj);
|
||||
int Count();
|
||||
int Count(string status);
|
||||
List<T> FindAll();
|
||||
}
|
||||
Reference in New Issue
Block a user