public static Domain.Models.Epic MapWithCategoryAndWriter(Epic entity) { return(new Domain.Models.Epic { ID = entity.Id, Title = entity.Name, Date = (DateTime)entity.DateCreated, Concept = entity.Concept, Writer = UserMapper.Map(entity.Writer), Categories = entity.EpicCategories.Select(c => CategoryMapper.Map(c.Category)) }); }
public static Domain.Models.Epic MapFull(Epic entity) { return(new Domain.Models.Epic { ID = entity.Id, Title = entity.Name, Date = (DateTime)entity.DateCreated, Concept = entity.Concept, DateCompleted = entity.DateCompleted ?? DateTime.MinValue, Writer = UserMapper.Map(entity.Writer), Categories = entity.EpicCategories.Select(c => CategoryMapper.Map(c.Category)), Ratings = entity.Ratings.Select(RatingMapper.Map), Comments = entity.Comments.Select(CommentMapper.Map), Chapters = entity.Chapters.Select(ChapterMapper.Map) }); }