ошибки
This commit is contained in:
parent
60c42520d7
commit
792eda80bc
@ -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)
|
||||
{
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user