纽威
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

31 lines
1.2 KiB

using NFine.Code;
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Linq.Expressions;
namespace NFine.Data
{
/// <summary>
/// 仓储接口
/// </summary>
/// <typeparam name="TEntity">实体类型</typeparam>
public interface IRepositoryBase<TEntity> where TEntity : class,new()
{
int Insert(TEntity entity);
int Insert(List<TEntity> entitys);
int Update(TEntity entity);
int Delete(TEntity entity);
int Delete(Expression<Func<TEntity, bool>> predicate);
TEntity FindEntity(object keyValue);
TEntity FindEntity(Expression<Func<TEntity, bool>> predicate);
IQueryable<TEntity> IQueryable();
IQueryable<TEntity> IQueryable(Expression<Func<TEntity, bool>> predicate);
List<TEntity> FindList(string strSql);
List<TEntity> FindList(string strSql, DbParameter[] dbParameter);
List<TEntity> FindList(Pagination pagination);
List<TEntity> FindList(Expression<Func<TEntity, bool>> predicate, Pagination pagination);
List<TEntity> FindList(Expression<Func<TEntity, bool>> predicate, ref Pagination pagination);
}
}