Exemplo n.º 1
0
 public BannerItem(RBannerItem bannerItem)
 {
     Id             = bannerItem.Id;
     BannerItemName = bannerItem.BannerItemName;
     BannerId       = bannerItem.BannerId;
     TargetUrl      = bannerItem.TargetUrl;
     ImageUrl       = bannerItem.ImageUrl;
     StartDateUtc   = bannerItem.StartDateUtc;
     EndDateUtc     = bannerItem.EndDateUtc;
     Status         = bannerItem.Status;
     IsDefault      = bannerItem.IsDefault;
     BackgroundRGB  = bannerItem.BackgroundRGB;
     UpdatedDateUtc = bannerItem.UpdatedDateUtc;
     CreatedDateUtc = bannerItem.CreatedDateUtc;
     CreatedUid     = bannerItem.CreatedUid;
     UpdatedUid     = bannerItem.UpdatedUid;
 }
Exemplo n.º 2
0
 public static BannerItemViewModel ToModel(this RBannerItem request)
 {
     if (request == null)
     {
         return(null);
     }
     return(new BannerItemViewModel()
     {
         Id = request.Id,
         BannerId = request.BannerId,
         BannerItemName = request.BannerItemName,
         TargetUrl = request.TargetUrl,
         ImageUrl = request.ImageUrl,
         BackgroundRGB = request.BackgroundRGB,
         Status = request.Status,
         IsDefault = request.IsDefault,
         StartDateUtc = request.StartDateUtc,
         EndDateUtc = request.EndDateUtc,
         Version = request.Version
     });
 }