Пример #1
0
 public Student_ClassController(EdDbContext context)
 {
     _context = context;
 }
 public StudentsController()
 {
     _context = new EdDbContext();
 }
 public MajorsController(EdDbContext context)
 {
     _context = context;
 }
Пример #4
0
 public ClassesController(EdDbContext context)
 {
     _context = context;
 }
        private readonly EdDbContext _context; //readonly - property that does not need to be initialized when you declare it,
        //but you have to give it a value in your constructor and then it becomes a constant and cannot be changed

        public MajorsController(EdDbContext context)   //context passed in the constructor, do not have to create an instance system does it
        {
            _context = context;
        }
Пример #6
0
 public MajorsController()
 {
     _context = new EdDbContext();
 }
 public InstructorsController(EdDbContext context)
 {
     _context = context;
 }