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 }); }
private Uri CreateItemUrl(Order order, OrderItem item) { return(new Uri( Url.Action( nameof(GetItem), new { orderId = order.Id, itemId = item.Id }), UriKind.Relative)); }