Exemplo n.º 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)));
 }
Exemplo n.º 2
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()));
 }
Exemplo n.º 3
0
 private CourseApi(Guid id,
                   string name,
                   string description,
                   AuthorApi author,
                   IEnumerable <VideoApi> videos)
 {
     Id          = id;
     Name        = name;
     Description = description;
     Author      = author;
     Videos      = videos;
 }
Exemplo n.º 4
0
 public static Author ToDomain(AuthorApi author)
 {
     return(Author.Create(author.Id, author.Name, author.ImageUrl));
 }