コード例 #1
0
 public async Task <IEnumerable <Template> > Search(TemplateSearchCondition cond)
 {
     using (var db = new Entities()) {
         var query = cond.Filter(db.Templates.Where(t => !t.IsDeleted));
         return(await query
                .OrderBy(m => m.Code)
                .DoPage(cond.Pager).ToListAsync());
     }
 }
コード例 #2
0
        public async Task<IEnumerable<Template>> GetTemplates(string code, string appCode, MsgTypes? msgType = null, Langs? lang = null) {
            var cond = new TemplateSearchCondition() {
                AllowPage = false,
                AppCode = appCode,
                Code = code,
                Lang = lang,
                MsgType = msgType
            };

            return await this.TemplateBiz.Value.Search(cond);
        }
コード例 #3
0
        public async Task <IEnumerable <Template> > GetTemplates(string code, string appCode, MsgTypes?msgType = null, Langs?lang = null)
        {
            var cond = new TemplateSearchCondition()
            {
                AllowPage = false,
                AppCode   = appCode,
                Code      = code,
                Lang      = lang,
                MsgType   = msgType
            };

            return(await this.TemplateBiz.Value.Search(cond));
        }
コード例 #4
0
 public async Task <ActionResult> Index(TemplateSearchCondition condition)
 {
     return(View(PDM.Create(await this.Biz.Value.Search(condition), condition)));
 }
コード例 #5
0
 public async Task<ActionResult> Index(TemplateSearchCondition condition) {
     return View(PDM.Create(await this.Biz.Value.Search(condition), condition));
 }
コード例 #6
0
ファイル: TemplateBiz.cs プロジェクト: gruan01/MessageCenter
 public async Task<IEnumerable<Template>> Search(TemplateSearchCondition cond) {
     using (var db = new Entities()) {
         var query = cond.Filter(db.Templates.Where(t => !t.IsDeleted));
         return await query
             .OrderBy(m => m.Code)
             .DoPage(cond.Pager).ToListAsync();
     }
 }