Example #1
0
        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());
        }
Example #2
0
        public ActionResult Index()
        {
            Response.Write(UowFactory.Get() + "<br>");
            Response.Write(UowFactory.Get() + "<br>");
            Response.Write(UowFactory.Get() + "<br>");

            return(View());
        }
Example #3
0
        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));
        }
Example #4
0
        public static IList <AssignedCoursePreview> GetList(InstructorEdit instructor)
        {
            var repo = UowFactory.Get().Repository <CourseRepository>();

            return(ModelHelper.FetchList <AssignedCoursePreview>(repo.GetAll(), instructor));
        }
Example #5
0
        public static async Task <IList <DepartmentLookup> > GetList()
        {
            var repo = new DepartmentRepository(UowFactory.Get());

            return(ModelHelper.FetchList <DepartmentLookup, DepartmentDto>(await repo.GetLookupListAsync()));
        }
Example #6
0
        public static IList <StudentPreview> GetList()
        {
            var repo = new StudentRepository(UowFactory.Get());

            return(ModelHelper.FetchList <StudentPreview, Student>(repo.GetAll()));
        }
Example #7
0
        public static async Task <IList <StudentPreview> > GetListAsync()
        {
            var repo = new StudentRepository(UowFactory.Get());

            return(ModelHelper.FetchList <StudentPreview, Student>(await repo.GetAllAsync()));
        }
Example #8
0
        public static async Task <IList <InstructorPreview> > GetAllAsync()
        {
            var repo = UowFactory.Get().Repository <InstructorRepository>();

            return(ModelHelper.FetchList <InstructorPreview, Instructor>(await repo.GetAllAsync()));
        }
Example #9
0
        public static IList <EnrollmentPreview> GetList(int studentId)
        {
            var repo = new EnrollmentRepository(UowFactory.Get());

            return(ModelHelper.FetchList <EnrollmentPreview>(repo.GetByStudentId(studentId)));
        }