-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIGenericRepository
29 lines (28 loc) · 1.04 KB
/
IGenericRepository
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
namespace Youthifi.BusinessLogicLayer.Interface
{
public interface IGenericRepository<T> where T : class
{
Task<IEnumerable<T>> GetAll(
Expression<Func<T, bool>> filter = null,
int pageNumber = 1,
int pageSize = 8,
bool isPaged = true,
Expression<Func<T, T>> select = null,
Func<IQueryable<T>, IOrderedQueryable<T>> orderBy = null,
string includeProperties = "");
Task<T> GetFirst(Expression<Func<T, bool>> filter);
Task<T> GetById(string id);
Task Add(T obj);
Task Add(IEnumerable<T> obj);
Task Update(T obj);
Task Update(IEnumerable<T> obj);
Task Delete(string id);
Task DeleteAll();
Task<int> GetCount(Expression<Func<T, bool>> filter = null);
}
}