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())); }
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))); }
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); }
public static Video ToDomain(VideoApi video) { return(Library.Domain.CourseAggregate.Model.Video.Create(video.Id, video.Name, video.Url)); }