public TestClass GetFromDb(CSOMContext dbContext) { var app = dbContext.APPLICATIONS.Find(8206847); Id = app.PROGRAM_ID; Name = app.PROGRAM.PROGRAM1; Term = app.TERM.TERM1; return(this); }
public TestClass GetFromDb(CSOMContext dbContext) { var app = dbContext.APPLICATIONS.Find(8206847); Id = app.PROGRAM_ID; Name = app.PROGRAM.PROGRAM1; Term = app.TERM.TERM1; return this; }
public IQueryable <BaseProgramViewModel> GetPrograms(CSOMContext dbContext, int?programId) { return(dbContext.PROGRAMS .Where(p => p.TERMS_APPLY_ACTIVE.Any()) .OrderBy(p => p.SORT_ORDER) .Select(p => new BaseProgramViewModel() { Id = p.PROGRAM_ID, Name = p.PROGRAM1 })); }
public IQueryable <BaseTermVeiwModel> GetTerms(CSOMContext dbContext, int?programId) { var result = dbContext .TERMS_APPLY_ACTIVE .Where(t => t.PROGRAM_ID == programId) .Select(t => new BaseTermVeiwModel() { Id = t.TERM_ID, Name = t.TERM.TERM1 }); return(result); }
public IQueryable <CounterModel> GetPrograms(CSOMContext dbContext, int?programId) { var programs = dbContext.PROGRAMS .Where(p => p.TERMS_APPLY_ACTIVE.Any()) .OrderBy(p => p.SORT_ORDER) .Select(p => new CounterModel() { Id = p.PROGRAM_ID, Name = p.PROGRAM1, NumberOfApplications = p.APPLICATIONS.Count(), IsSelected = (p.PROGRAM_ID == programId) }); Console.WriteLine(programs); return(programs); }
public IQueryable <TimeLineModel> GetTerms(CSOMContext dbContext, int?programId) { var result = dbContext .TERMS_APPLY_ACTIVE .Where(t => t.PROGRAM_ID == programId) .Where(t => t.TERM.DATE_START != null) .Where(t => t.TERM.DATE_END != null) .Select(t => new TimeLineModel() { Id = t.TERM_ID, Name = t.TERM.TERM1, StartDate = t.TERM.DATE_START.Value, EndDate = t.TERM.DATE_END.Value }); return(result); }
public BaseDashboardController() { _dbContext = new CSOMContext(); }
public TimeLineController() { _dbContext = new CSOMContext(); }
public HomeController() { DbContext = new CSOMContext(); }
public CounterController() { _dbContext = new CSOMContext(); }
// doing a simle query for a widget public TestController() { DbContext = new CSOMContext(); }
public PageValidationResult Validate(CSOMContext dbContext, APPLICATION app) { throw new System.NotImplementedException(); }