Пример #1
0
 public static CourseListDTO Entity2CourseListDTO(this USER_CourseToken entity, decimal?price, decimal?monthlySubscriptionPrice)
 {
     return(new CourseListDTO
     {
         CourseId = entity.Id
         , Uid = entity.Uid
         , Name = entity.CourseName
         , Price = price
         , MonthlySubscriptionPrice = monthlySubscriptionPrice
         , AuthorId = entity.AuthorUserId
         , AuthorFullName = entity.Entity2AuthorFullName()
         , LearnerCount = entity.LearnerCount
         , ReviewCount = entity.ReviewCount
         , ImageUrl = entity.SmallImage.ToThumbUrl(Constants.ImageBaseUrl)
         , AddOn = entity.Created
     });
 }
Пример #2
0
 public static string Entity2AuthorFullName(this USER_CourseToken entity)
 {
     return(CombineFullName(entity.AuthorFirstName, entity.AuthorLastName, entity.AuthorNickname));
 }