public override WTableReference ToTableReference() { List <WScalarExpression> parameters = new List <WScalarExpression>(); WTableReference tableReference; if (PredicateContext != null) { parameters.Add(SqlUtil.GetScalarSubquery(PredicateContext.ToSelectQueryBlock())); parameters.Add(SqlUtil.GetScalarSubquery(TrueChoiceContext.ToSelectQueryBlock())); parameters.Add(SqlUtil.GetScalarSubquery(FalseChocieContext.ToSelectQueryBlock())); tableReference = SqlUtil.GetFunctionTableReference(GremlinKeyword.func.Choose, parameters, GetVariableName()); } else { parameters.Add(SqlUtil.GetScalarSubquery(ChoiceContext.ToSelectQueryBlock())); foreach (var option in Options) { if (option.Key is GremlinKeyword.Pick && (GremlinKeyword.Pick)option.Key == GremlinKeyword.Pick.None) { parameters.Add(SqlUtil.GetValueExpr(null)); } else { parameters.Add(SqlUtil.GetValueExpr(option.Key)); } parameters.Add(SqlUtil.GetScalarSubquery(option.Value.ToSelectQueryBlock())); } tableReference = SqlUtil.GetFunctionTableReference(GremlinKeyword.func.ChooseWithOptions, parameters, GetVariableName()); } return(SqlUtil.GetCrossApplyTableReference(tableReference)); }
internal override List <GremlinVariable> FetchAllTableVars() { List <GremlinVariable> variableList = new List <GremlinVariable>() { this }; if (PredicateContext != null) { variableList.AddRange(PredicateContext.FetchAllTableVars()); variableList.AddRange(TrueChoiceContext.FetchAllTableVars()); variableList.AddRange(FalseChocieContext.FetchAllTableVars()); } else { variableList.AddRange(ChoiceContext.FetchAllTableVars()); foreach (var option in Options) { variableList.AddRange(option.Value.FetchAllTableVars()); } } return(variableList); }
public StudentsController(ChoiceContext context, UserManager <ApplicationUser> userManager, IGroupService groupService) { _groupService = groupService; _userManager = userManager; _context = context; }
public TeachersController(ChoiceContext context) { _context = context; }
public DisciplinesController(ChoiceContext context) { _context = context; }
public IndexModel(ChoiceContext db) { _db = db; }
public TeachersController(ChoiceContext context, UserManager <ApplicationUser> userManager) { _userManager = userManager; _context = context; }
public HomeController(ILogger <HomeController> logger, ChoiceContext context) { _logger = logger; _context = context; }