示例#1
0
 public CourseViewModel(Course course)
 {
     this.Id = course.Id;
     this.Title = course.Title;
     this.Description = course.Description;
     this.Syllabus = course.Syllabus;
     this.AboutCourse = course.AboutCourse;
     this.Lectures = course.Lectures;
     this.Schedule = course.Schedule;
     this.PictureUrl = Path.Combine(Constants.UPLOADS_PATH, course.PictureUrl);
     this.VideoUrl = course.VideoUrl;
     this.IsPublic = course.IsPublic;
 }
示例#2
0
        public void CourseGenerator()
        {
            Course course1 = new Course();
            course1.Title = "Matematicas con tom y jerry";
            course1.SchoolId = 1;
            course1.Description = "Little description";
            course1.AboutCourse = "This is all about the <b>course</b>";
            course1.PictureUrl = "class_default.jpg";
            course1.Syllabus = "Syllabus";
            course1.Schedule = "8am to 10am";
            course1.Lectures = "empty";
            course1.IsPublic = false;
            course1.Description = "Introduccion a las matematicas";

            Course course2 = new Course();
            course2.Title = "Literatura";
            course2.SchoolId = 1;
            course2.Description = "Little description";
            course2.AboutCourse = "This is all about the <b>course</b>";
            course2.PictureUrl = "class_default.jpg";
            course2.Syllabus = "Syllabus 2";
            course2.Schedule = "9am to 11am";
            course2.Lectures = "empty";
            course2.IsPublic = false;
            course2.Description = "COnocimiento literario basico";

            Course course3 = new Course();
            course3.Title = "Curso privado de quimica";
            course3.SchoolId = 1;
            course3.Description = "Little description";
            course3.AboutCourse = "This is all about the <b>course</b>";
            course3.PictureUrl = "class_default.jpg";
            course3.Syllabus = "Syllabus quimica";
            course3.Schedule = "9am to 11am";
            course3.Lectures = "empty";
            course3.IsPublic = false;
            course3.Description = "COnocimiento quimica basico";

            Course course4 = new Course();
            course4.Title = "Fisica mecanica";
            course4.SchoolId = 1;
            course4.Description = "Little description";
            course4.AboutCourse = "This is all about the <b>course</b>";
            course4.PictureUrl = "class_default.jpg";
            course4.Syllabus = "Syllabus fisica";
            course4.Schedule = "9am to 11am";
            course4.Lectures = "empty";
            course4.IsPublic = true;
            course4.Description = "COnocimiento fisica basico";

            Course course5 = new Course();
            course5.Title = "Curso publico 3";
            course5.SchoolId = 1;
            course5.Description = "Little description";
            course5.AboutCourse = "This is all about the <b>course</b>";
            course5.PictureUrl = "class_default.jpg";
            course5.Syllabus = "Syllabus 3";
            course5.Schedule = "9am to 11am";
            course5.Lectures = "empty";
            course5.IsPublic = true;
            course5.Description = "COnocimiento literario basico";

            Course course6 = new Course();
            course6.Title = "Curso publico 4";
            course6.SchoolId = 1;
            course6.Description = "Little description";
            course6.AboutCourse = "This is all about the <b>course</b>";
            course6.PictureUrl = "class_default.jpg";
            course6.Syllabus = "Syllabus 4";
            course6.Schedule = "9am to 11am";
            course6.Lectures = "empty";
            course6.IsPublic = false;
            course6.Description = "COnocimiento literario basico";

            context.Courses.Add(course1);
            context.Courses.Add(course2);
            context.Courses.Add(course3);
            context.Courses.Add(course4);
            context.Courses.Add(course5);
            context.Courses.Add(course6);
        }