コード例 #1
0
 public async Task <List <AmqCvRate> > GetAsync(AmqCvRate model, EntityContextFASTTRACK context)
 {
     return(await context.AmqCvRate
            .Where(c => c.Prdplan == model.Prdplan && c.Insureage == model.Insureage)
            .OrderBy(c => c.Endyear)
            .ToListAsync());
 }
コード例 #2
0
ファイル: AmqPlan.cs プロジェクト: OakeTH/PlanBrochureCore3
 public async Task <List <AmqPlan> > GetAsync(EntityContextFASTTRACK context)
 {
     return(await context.AmqPlan
            .Join(context.AmqProduct, plan => plan.ProdId, product => product.ProdId, (plan, product) => new { plan, product })
            .Join(context.AmqProductGroup, B => B.product.ProdGrpId, planGr => planGr.ProdGrpId,
                  (B, planGr) => new AmqPlan
     {
         PlanCode = B.plan.PlanCode,
         PlanShortNameTh = (B.plan.IsActive != "A" ? MsgNotSale : B.product.IsActive != "A" ? MsgNotSale : "") + B.plan.PlanCode + " : " + B.plan.PlanShortNameTh,
         ProdGrpNameTh = planGr.ProdGrpNameTh,
         IsActive = B.plan.IsActive,
         ProdGrpType = planGr.ProdGrpType
     })
            .Where(c => c.ProdGrpType == "B")
            .ToListAsync());
 }
コード例 #3
0
ファイル: AmqPlan.cs プロジェクト: OakeTH/PlanBrochureCore3
 public async Task <bool> IsActivePlan(string PlanCode, EntityContextFASTTRACK context) =>
 await context.AmqPlan.Where(c => c.PlanCode == PlanCode && c.IsActive == "A").AnyAsync();
コード例 #4
0
 public PlanController(IOptions <AppSettings> _appSettings, EntityContextFASTTRACK _contextFt, EntityContextWEB _contextWeb)
 {
     appSettings = _appSettings.Value;
     contextFt   = _contextFt;
     contextWeb  = _contextWeb;
 }