public static IList <CoursePreview> GetList() { var repo = UowFactory.Get().Repository <CourseRepository>(); return(ModelHelper.FetchList <CoursePreview, Course>(repo.GetAll())); //return ModelHelper.FetchList<CoursePreview, CourseDto>(await repo.GetAllAsync()); }
public ActionResult Index() { Response.Write(UowFactory.Get() + "<br>"); Response.Write(UowFactory.Get() + "<br>"); Response.Write(UowFactory.Get() + "<br>"); return(View()); }
public static IList <StudentPreview> GetList(string sortBy, string sortOrder) { var repo = new StudentRepository(UowFactory.Get()); var list = repo.Query() .OrderBy(string.Format("{0} {1}", sortBy ?? "Id", sortOrder)) .List(); return(ModelHelper.FetchList <StudentPreview, Student>(list)); }
public static IList <AssignedCoursePreview> GetList(InstructorEdit instructor) { var repo = UowFactory.Get().Repository <CourseRepository>(); return(ModelHelper.FetchList <AssignedCoursePreview>(repo.GetAll(), instructor)); }
public static async Task <IList <DepartmentLookup> > GetList() { var repo = new DepartmentRepository(UowFactory.Get()); return(ModelHelper.FetchList <DepartmentLookup, DepartmentDto>(await repo.GetLookupListAsync())); }
public static IList <StudentPreview> GetList() { var repo = new StudentRepository(UowFactory.Get()); return(ModelHelper.FetchList <StudentPreview, Student>(repo.GetAll())); }
public static async Task <IList <StudentPreview> > GetListAsync() { var repo = new StudentRepository(UowFactory.Get()); return(ModelHelper.FetchList <StudentPreview, Student>(await repo.GetAllAsync())); }
public static async Task <IList <InstructorPreview> > GetAllAsync() { var repo = UowFactory.Get().Repository <InstructorRepository>(); return(ModelHelper.FetchList <InstructorPreview, Instructor>(await repo.GetAllAsync())); }
public static IList <EnrollmentPreview> GetList(int studentId) { var repo = new EnrollmentRepository(UowFactory.Get()); return(ModelHelper.FetchList <EnrollmentPreview>(repo.GetByStudentId(studentId))); }