public virtual TViewModel Get(Expression <Func <TViewModel, bool> > whereSelector, string include = "", IEnumerable <OrderByEntity> orderBy = null) { var item = DAL.Get(MySQLUtility.GetModelExpr <TViewModel, TModel>(whereSelector), include, orderBy); if (item != null) { return(item.MapTo(RetrieveSelector)); } else { return(default);
public virtual int Count(WhereQueryable <TViewModel, TForeignModel> whereSelector, string include = "", bool isAll = true) { return(DAL.Count(MySQLUtility.GetModelExpr <TViewModel, TModel, TForeignModel>(whereSelector.Expr), include, isAll)); }
public virtual List <TViewModel> GetList(Expression <Func <TViewModel, TForeignModel, bool> > whereSelector, int pageSize, int pageNum, string include = "", IEnumerable <OrderByEntity> orderBy = null) { return(DAL.GetList(MySQLUtility.GetModelExpr <TViewModel, TModel, TForeignModel>(whereSelector), pageSize, pageNum, include, orderBy).MapAllTo(RetrieveSelector).ToList()); }
public virtual int Count(Expression <Func <TViewModel, TForeignModel, bool> > whereSelector, string include = "", bool isAll = true) { return(DAL.Count(MySQLUtility.GetModelExpr <TViewModel, TModel, TForeignModel>(whereSelector), include, isAll)); }
public string ToString <TModel>() where TModel : IFoundationModel, new() { return(MySQLUtility.ExecuteParm(MySQLUtility.GetModelExpr <TViewModel, TModel>(Expr), "").Item2); }