using New_College.Model; using SqlSugar; using System; using System.Collections.Generic; using System.Data; using System.Linq.Expressions; using System.Threading.Tasks; namespace New_College.IRepository.Base { public interface IBaseRepository where TEntity : class { Task QueryById(object objId); Task QueryById(object objId, bool blnUseCache = false); Task> QueryByIDs(object[] lstIds); Task Add(TEntity model); Task Add(List listEntity); Task DeleteById(object id); Task Delete(TEntity model); Task DeleteByIds(object[] ids); Task Update(TEntity model); Task Update(TEntity entity, string strWhere); Task Update(object operateAnonymousObjects); Task Update(TEntity entity, List lstColumns = null, List lstIgnoreColumns = null, string strWhere = ""); Task> Query(); Task> Query(string strWhere); Task> Query(Expression> whereExpression); Task> Query(Expression> whereExpression, string strOrderByFileds); Task> Query(Expression> whereExpression, Expression> orderByExpression, bool isAsc = true); Task> Query(string strWhere, string strOrderByFileds); Task> Query(Expression> whereExpression, int intTop, string strOrderByFileds); Task> Query(string strWhere, int intTop, string strOrderByFileds); Task> QuerySql(string strSql, SugarParameter[] parameters = null); Task QueryTable(string strSql, SugarParameter[] parameters = null); Task> Query( Expression> whereExpression, int intPageIndex, int intPageSize, string strOrderByFileds); Task> Query(string strWhere, int intPageIndex, int intPageSize, string strOrderByFileds); Task> QueryPage(Expression> whereExpression, int intPageIndex = 1, int intPageSize = 20, string strOrderByFileds = null); Task> QueryMuch( Expression> joinExpression, Expression> selectExpression, Expression> whereLambda = null) where T : class, new(); } }