ошибки

This commit is contained in:
antoc0der 2024-04-10 16:17:34 +04:00
parent 60c42520d7
commit 792eda80bc
2 changed files with 4 additions and 4 deletions

View File

@ -13,8 +13,7 @@ namespace FlowerShopClientApp
{
_client.BaseAddress = new Uri(configuration["IPAddress"]);
_client.DefaultRequestHeaders.Accept.Clear();
_client.DefaultRequestHeaders.Accept.Add(new
MediaTypeWithQualityHeaderValue("application/json"));
_client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
}
public static T? GetRequest<T>(string requestUrl)
{

View File

@ -18,7 +18,7 @@ namespace FlowerShopDatabaseImplement.Implements
public List<OrderViewModel> GetFullList()
{
using var context = new FlowerShopDataBase();
return context.Orders.Include(x => x.Flower)
return context.Orders.Include(x => x.Flower).Include(x => x.Client)
.Select(x => x.GetViewModel)
.ToList();
}
@ -30,7 +30,8 @@ namespace FlowerShopDatabaseImplement.Implements
return context.Orders.Include(x => x.Flower)
.Where(x => ((!model.Id.HasValue || x.Id == model.Id) &&
(!model.DateFrom.HasValue || x.DateCreate >= model.DateFrom) &&
(!model.DateTo.HasValue || x.DateCreate <= model.DateTo)))
(!model.DateTo.HasValue || x.DateCreate <= model.DateTo) &&
(!model.ClientId.HasValue || x.ClientId == model.ClientId)))
.Select(x => x.GetViewModel)
.ToList();
}