Пример #1
0
 public static Dto.OrderItem ToDto(this Model.OrderItem model, Uri id)
 {
     return(new Dto.OrderItem
     {
         Id = id,
         ProductId = model.ProductId,
         Amount = model.Amount,
         CreatedAt = model.CreatedAt,
         LastModifiedAt = model.LastModifiedAt
     });
 }
Пример #2
0
 private Uri CreateItemUrl(Order order, OrderItem item)
 {
     return(new Uri(
                Url.Action(
                    nameof(GetItem),
                    new
     {
         orderId = order.Id,
         itemId = item.Id
     }),
                UriKind.Relative));
 }