// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, AbcSchoolDbContext dbContext)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/error");
            }

            dbContext.Database.EnsureCreated();

            app.UseHttpsRedirection();

            app.UseRouting();

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }
 public UnitOfWork(AbcSchoolDbContext context, StudentRepository studentRepository, SubjectRepository subjectRepository)
 {
     _context          = context;
     StudentRepository = studentRepository;
     SubjectRepository = subjectRepository;
 }
Ejemplo n.º 3
0
        // student specific stuff


        public StudentsRepo(AbcSchoolDbContext context) : base(context)
        {
        }
 public SubjectRepository(AbcSchoolDbContext context) : base(context)
 {
     _context = context;
 }
 public StudentRepository(AbcSchoolDbContext context) : base(context)
 {
     _context = context;
 }
Ejemplo n.º 6
0
        public BaseRepository(AbcSchoolDbContext context)
        {
            this.context = context;

            this.dbSet = context.Set <T>();
        }
Ejemplo n.º 7
0
        // student specific stuff


        public SubjectsRepo(AbcSchoolDbContext context) : base(context)
        {
        }
 protected GenericRepository(AbcSchoolDbContext context)
 {
     this.Context = context;
 }