Esempio n. 1
0
        public static List <SubscribersView> CastFromSubscribers(List <string> subscribed)
        {
            var subscribersViews = new List <SubscribersView>();

            foreach (var subscriber in subscribed)
            {
                var subscriberView = new SubscribersView();
                subscriberView.Email = subscriber;
                subscribersViews.Add(subscriberView);
            }

            return(subscribersViews);
        }
Esempio n. 2
0
        public static CourseView CastFromCourseModel(NekoUchi.Model.Course course)
        {
            var courseView = new CourseView();

            courseView.Author         = course.Author;
            courseView.CourseName     = course.Name;
            courseView.Description    = course.Description;
            courseView.Identification = course.Identification;

            courseView.Lessons    = GridLessonView.CastFromLessonModel(course.Lessons, course.Identification);
            courseView.Subscribed = SubscribersView.CastFromSubscribers(course.Subscribed);
            courseView.Statistics = CourseStatisticsView.CastStats(course.Statistics);

            return(courseView);
        }