示例#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)));
 }
示例#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);
        }