Ejemplo n.º 1
0
 public static Course ToDomain(CourseApi course)
 {
     return(Library.Domain.CourseAggregate.Model.Course.Create(
                course.Id,
                course.Name,
                course.Description,
                AuthorApi.ToDomain(course.Author),
                VideoApi.ToDomain(course.Videos).ToList()));
 }
Ejemplo n.º 2
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)));
 }
Ejemplo n.º 3
0
        public static IEnumerable <Video> ToDomain(IEnumerable <VideoApi> videos)
        {
            var list = new List <Video>();

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

            return(list);
        }
Ejemplo n.º 4
0
 public static Video ToDomain(VideoApi video)
 {
     return(Library.Domain.CourseAggregate.Model.Video.Create(video.Id, video.Name, video.Url));
 }