Exemple #1
0
 public static CourseApi FromDomain(Course course)
 {
     return(new CourseApi(
                course.Id,
                course.CourseName.Name,
                course.CourseDescription.Description,
                AuthorApi.FromDomain(course.Author),
                VideoApi.FromDomain(course.Videos)));
 }
Exemple #2
0
        public static IEnumerable <VideoApi> FromDomain(IEnumerable <Video> videos)
        {
            var list = new List <VideoApi>();

            foreach (var video in videos)
            {
                list.Add(VideoApi.FromDomain(video));
            }

            return(list);
        }