public static BundleInfoDTO BundleToken2BundleInfoDto(this CRS_BundleInfoToken token, string trackingId) { if (token == null) { return(null); } var dto = new BundleInfoDTO { BundleId = token.BundleId , BundleName = token.BundleName , Description = token.BundleDescription , ThumbUrl = token.BannerImage.ToThumbUrl(Constants.ImageBaseUrl) , PromoVideoIdentifier = String.IsNullOrEmpty(token.OverviewVideoIdentifier) ? (long?)null : Int64.Parse(token.OverviewVideoIdentifier) , PriceToken = new PriceBaseDTO { Price = token.Price , MonthlySubscriptionPrice = token.MonthlySubscriptionPrice } , Author = new UserInfoDTO { UserId = token.AuthorId , FirstName = token.FirstName , LastName = token.LastName , FullName = token.Entity2AuthorFullName() , Email = token.Email , FacebookId = token.FacebookID } }; dto.BundlePageUrl = token.GenerateBundleFullPageUrl(dto.Author.FullName, dto.BundleName, trackingId); return(dto); }
public static string Entity2AuthorFullName(this CRS_BundleInfoToken entity) { return(CombineFullName(entity.FirstName, entity.LastName, entity.Nickname)); }