(this Basket basket)
| 8 | public static class BasketExtensions |
| 9 | { |
| 10 | public static BasketDto ToDto(this Basket basket) |
| 11 | { |
| 12 | return new BasketDto |
| 13 | { |
| 14 | BasketId = basket.BasketId, |
| 15 | ClientSecret = basket.ClientSecret, |
| 16 | Coupon = basket.Coupon, |
| 17 | Items = basket.Items.Select(x => new BasketItemDto |
| 18 | { |
| 19 | ProductId = x.ProductId, |
| 20 | Name = x.Product.Name, |
| 21 | Price = x.Product.Price, |
| 22 | Brand = x.Product.Brand, |
| 23 | Type = x.Product.Type, |
| 24 | PictureUrl = x.Product.PictureUrl, |
| 25 | Quantity = x.Quantity |
| 26 | }).ToList() |
| 27 | }; |
| 28 | } |
| 29 | |
| 30 | public static async Task<Basket> GetBasketWithItems(this IQueryable<Basket> query, |
| 31 | string? basketId) |
nothing calls this directly
no outgoing calls
no test coverage detected