public IHttpActionResult GetSections(int sectionId) { using (var db = new StudyHubContext()) { var model = db.Section.Where(x => x.SectionId==sectionId) .Include(x => x.SubSection) .Select(x => x.SubSection) .ToList(); return Json(model); } }
public UserRepository(StudyHubContext context) : base(context) { }
public GenericRepository(StudyHubContext context) { this.context = context; }
public AdminRepository(StudyHubContext context) : base(context) { }
public CourseRepository(StudyHubContext context) : base(context) { }
public AuthRepository(StudyHubContext context) : base(context) { }