25 lines
829 B
C#
25 lines
829 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Linq.Expressions;
|
|
using System.Text;
|
|
|
|
namespace KanSan.DataStoring.Contract
|
|
{
|
|
public interface IRepository<TEntity> where TEntity : class
|
|
{
|
|
void Delete(TEntity entityToDelete);
|
|
void Delete(int id);
|
|
IEnumerable<TEntity> GetAll(string include);
|
|
IEnumerable<TEntity> Get(
|
|
Expression<Func<TEntity, bool>> filter = null,
|
|
Func<IQueryable<TEntity>, IOrderedQueryable<TEntity>> orderBy = null,
|
|
string includeProperties = "");
|
|
TEntity GetByID(object id);
|
|
void Insert(TEntity entity);
|
|
void Update(TEntity entity);
|
|
IQueryable<TEntity> Include(params Expression<Func<TEntity, object>>[] includes);
|
|
IQueryable<TEntity> Query { get; }
|
|
}
|
|
}
|