public static ResponseStatusDetail FromApiStatus(Status value, ResponseFileList icon) =>
 value == null ? null :
 new ResponseStatusDetail
 {
     Id   = value.Id,
     Name = value.Name,
     Icon = icon,
 };
예제 #2
0
 public static ResponseProductList FromApiProduct(Product value, File image, bool isFavorite, bool isCanBuy) =>
 value == null ? null :
 new ResponseProductList
 {
     Id          = value.Id,
     Name        = value.Name,
     Description = value.Descriptiom,
     Price       = value.Price,
     Image       = ResponseFileList.FromApiFile(image),
     IsFavorite  = isFavorite,
     IsCanBuy    = isCanBuy
 };