添加项目文件。
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace JY.DAL.Service
|
||||
{
|
||||
public interface IService<T> where T : class, new()
|
||||
{
|
||||
T GetById(object id);
|
||||
|
||||
T GetSingle(Expression<Func<T, bool>> predicate);
|
||||
|
||||
List<T> GetList();
|
||||
|
||||
List<T> GetList(Expression<Func<T, bool>> predicate);
|
||||
|
||||
List<T> GetListPaged(int pageIndex, int pageSize, out int totalCount, Expression<Func<T, bool>> predicate = null, string orderBy = null);
|
||||
|
||||
int Insert(T entity);
|
||||
|
||||
int Insert(List<T> entities);
|
||||
|
||||
int Update(T entity);
|
||||
|
||||
int Update(T entity, Expression<Func<T, bool>> whereExpression);
|
||||
|
||||
int Update(Expression<Func<T, T>> columns, Expression<Func<T, bool>> whereExpression);
|
||||
|
||||
int Delete(object id);
|
||||
|
||||
int Delete(Expression<Func<T, bool>> predicate);
|
||||
|
||||
int Delete(List<T> entities);
|
||||
|
||||
bool Any(Expression<Func<T, bool>> predicate);
|
||||
|
||||
int Count(Expression<Func<T, bool>> predicate = null);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user