public async Task <Order> CreateOrder(string UserName, CartViewModel Cart, OrderViewModel OrderModel) { var create_order_model = new CreateOrderDTO { Items = Cart.ToDTO(), Order = OrderModel, }; var response = await PostAsync($"{Address}/{UserName}", create_order_model).ConfigureAwait(false); var order_dto = await response.EnsureSuccessStatusCode().Content.ReadFromJsonAsync <OrderDTO>().ConfigureAwait(false); return(order_dto.FromDTO()); }