// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, IServiceProvider serviceProvider) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions { HotModuleReplacement = true }); } else { app.UseExceptionHandler("/Home/Error"); } app.UseStaticFiles(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); routes.MapSpaFallbackRoute( name: "spa-fallback", defaults: new { controller = "Home", action = "Index" }); }); AcademicContext.InitDb(serviceProvider); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindData(); using (var context = new AcademicContext()) { //var d = context.Level.Where(x => x.SchoolId == InitialValues.CustomSession["SchoolId"]). ToList(); //cmbLevel.DataSource = d; //cmbLevel.DataBind(); } var helper = new DbHelper.Structure(); cmbLevel.Width = 100; //cmbLevel.DataSource = helper.GetLevels(InitialValues.CustomSession["SchoolId"]); cmbLevel.DataMember = "Id"; cmbLevel.DataTextField = "Name"; cmbLevel.DataValueField = "Id"; cmbLevel.DataBind(); } }
public Teacher() { Context = new AcademicContext(); }
public MessageHelper() { Context = new AcademicContext(); }
public MatriculaController(AcademicContext dbContext) { DbContext = dbContext; }
public Event() { Context = new AcademicContext(); }
public Student() { Context = new AcademicContext(); }
public UserFileSeeder(AcademicContext context) { this._context = context; }
public WorkingWithFiles() { Context = new AcademicContext(); }
public StudentController(AcademicContext acadamicContext) { this.acadamicContext = acadamicContext; }
public Grade() { Context = new AcademicContext(); }
public TurmaController(AcademicContext dbContext) { DbContext = dbContext; }
public ReviewsController(AcademicContext db) { _db = db; }
public Structure() { Context = new AcademicContext(); }
public User() { Context = new AcademicContext(); }
public RoleSeeder(AcademicContext context) { this._context = context; }
public GenderSeeder(AcademicContext context) { this._context = context; }
public AcademicYearSeeder(AcademicContext context) { this._context = context; }
public Account() { Context = new AcademicContext(); }
public EstadoController(AcademicContext dbContext) { DbContext = dbContext; }
public Staff() { Context = new AcademicContext(); }
public AlunoController(AcademicContext dbContext) { DbContext = dbContext; }
public DisciplinaController(AcademicContext dbContext) { DbContext = dbContext; }
public Batch() { Context = new AcademicContext(); }
public AcademicYear() { Context = new AcademicContext(); }
public ProfessorController(AcademicContext db) { _db = db; }
public StudentController(AcademicContext dbContext, IOptions <AppSettings> options) { DbContext = dbContext; AppSettings = options.Value; }
public SubjectSection() { Context = new AcademicContext(); }
public ProfessorController(AcademicContext dbContext, IOptions <AppSettings> options) { DbContext = dbContext; AppSettings = options.Value; }
public Office() { Context = new AcademicContext(); }