// GET: Student public virtual async Task <ActionResult> Index() { ViewBag.Subjects = await SubjectCore.GetAllAsync().ConfigureAwait(false); ViewBag.Student = await StudentCore.GetAllAsync().ConfigureAwait(false); var students = await StudentCore.GetAllAsync(new[] { nameof(Student.Subjects) }).ConfigureAwait(false); return(View(students)); }
public virtual async Task <ActionResult> Filter(Guid?SubjectId) { ViewBag.Subject = await SubjectCore.GetAllAsync().ConfigureAwait(false); ViewBag.AllStudents = await StudentCore.GetAllAsync().ConfigureAwait(false); var model = await SubjectCore.GetFiltered(navigationProperties : new[] { nameof(Subject.Students) }).ConfigureAwait(false); if (model == null) { return(View()); } if (SubjectId != null && SubjectId != Guid.Empty) { ViewBag.ShiftIdToOpenInDialog = SubjectId.Value; } ViewBag.SubjectList = model.EntityContainers.First().Data; ViewBag.TotalShiftsCount = model.TotalItems; return(View(model)); }
// GET: Subject public virtual async Task <ActionResult> Index() { var subjects = await SubjectCore.GetAllAsync().ConfigureAwait(false); return(View(subjects)); }