コード例 #1
0
ファイル: FoundationBLL.cs プロジェクト: llorch19/H.Framework
        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);
コード例 #2
0
 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));
 }
コード例 #3
0
 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());
 }
コード例 #4
0
 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));
 }
コード例 #5
0
 public string ToString <TModel>() where TModel : IFoundationModel, new()
 {
     return(MySQLUtility.ExecuteParm(MySQLUtility.GetModelExpr <TViewModel, TModel>(Expr), "").Item2);
 }