public CartItemDetail(RCartItemDetail cartItemDetail)
 {
     Id             = cartItemDetail.Id;
     ShardId        = cartItemDetail.ShardId;
     CreatedDateUtc = cartItemDetail.CreatedDateUtc;
     UpdatedDateUtc = cartItemDetail.UpdatedDateUtc;
     CreatedUid     = cartItemDetail.CreatedUid;
     UpdatedUid     = cartItemDetail.UpdatedUid;
     LanguageId     = cartItemDetail.LanguageId;
     ProductId      = cartItemDetail.ProductId;
     Name           = cartItemDetail.Name;
 }
 public static CartItemViewModel ToModel(this RCartItem model, RCartItemDetail cartItemDetail, int quantity)
 {
     if (model == null)
     {
         return(null);
     }
     return(new CartItemViewModel()
     {
         ProductId = model.ProductId,
         Name = cartItemDetail?.Name,
         Quantity = quantity
     });
 }
 public static CheckoutItemViewModel ToCheckout(this RCartItem item, RCartItemDetail cartItemDetail, int quantity)
 {
     if (item == null)
     {
         return(null);
     }
     return(new CheckoutItemViewModel()
     {
         ProductId = item.ProductId,
         Name = cartItemDetail?.Name,
         Price = item.Price,
         Quantity = quantity
     });
 }