Borschevskaya A.A. Lab work 4 #6
@ -32,7 +32,7 @@ namespace FurnitureAssemFileImplement.Implements
|
||||
return new();
|
||||
}
|
||||
return source.Orders
|
||||
.Where(x => x.Id.Equals(model.Id))
|
||||
.Where(x => x.Id.Equals(model.Id) || model.DateFrom <= x.DateCreate && x.DateCreate <= model.DateTo)
|
||||
.Select(x => GetOrderViewModel(x))
|
||||
.ToList();
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
using var context = new FurnitureAssemblyDatabase();
|
||||
return context.Orders
|
||||
.Include(x => x.Furniture)
|
||||
.Where(x => x.Id == model.Id)
|
||||
.Where(x => x.Id == model.Id || model.DateFrom <= x.DateCreate && x.DateCreate <= model.DateTo)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user