+
This commit is contained in:
parent
c69a473c11
commit
4cbaec2b57
@ -24,8 +24,7 @@ namespace SushiBarDatabaseImplement.Implements
|
||||
return context.Orders
|
||||
.Include(o => o.Sushi)
|
||||
.Where(o =>
|
||||
(model.Id.HasValue && o.Id == model.Id) ||
|
||||
(model.DateFrom.HasValue && model.DateTo.HasValue && model.DateFrom < o.DateCreate && o.DateCreate < model.DateTo))
|
||||
(model.Id.HasValue && o.Id == model.Id))
|
||||
.Select(o => o.GetViewModel)
|
||||
.ToList();
|
||||
}
|
||||
@ -79,6 +78,7 @@ namespace SushiBarDatabaseImplement.Implements
|
||||
{
|
||||
using var context = new SushiBarDatabase();
|
||||
var element = context.Orders
|
||||
.Include(o => o.Sushi)
|
||||
.FirstOrDefault(o => o.Id == model.Id);
|
||||
if (element != null)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user