поиск компонентов и покупок по юзерам
This commit is contained in:
parent
0721ac8f89
commit
bcd8b8f156
@ -24,7 +24,8 @@ namespace ComputerHardwareStoreDatabaseImplement.Implements
|
||||
}
|
||||
using var context = new ComputerHardwareStoreDBContext();
|
||||
return context.Components
|
||||
.Where(c => c.Name.Contains(model.Name))
|
||||
.Where(c => c.Name.Contains(model.Name) ||
|
||||
(c.StoreKeeper.Id == model.StoreKeeperId))
|
||||
.Select(c => c.GetViewModel)
|
||||
.ToList();
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ namespace ComputerHardwareStoreDatabaseImplement.Implements
|
||||
.Include(p => p.Products)
|
||||
.ThenInclude(p => p.Product)
|
||||
.Where(p =>
|
||||
(model.VendorId.HasValue && model.VendorId == p.VendorId) ||
|
||||
(model.Id.HasValue && p.Id == model.Id) ||
|
||||
((model.DateFrom.HasValue && model.DateTo.HasValue) &&
|
||||
((model.DateFrom <= p.DateCreate && p.DateCreate <= model.DateTo) ||
|
||||
|
Loading…
Reference in New Issue
Block a user