This commit is contained in:
DeerElk 2024-05-05 05:45:08 +04:00
parent e62bd8a33c
commit 9106c350e0
2 changed files with 0 additions and 8 deletions

View File

@ -20,10 +20,6 @@ namespace ConfectioneryFileImplement.Implements
} }
public List<OrderViewModel> GetFilteredList(OrderSearchModel model) public List<OrderViewModel> GetFilteredList(OrderSearchModel model)
{ {
if (!model.Id.HasValue)
{
return new();
}
return source.Orders return source.Orders
.Where(x => ( .Where(x => (
(!model.Id.HasValue || x.Id == model.Id) && (!model.Id.HasValue || x.Id == model.Id) &&

View File

@ -24,10 +24,6 @@ namespace ConfectioneryListImplement.Implements
public List<OrderViewModel> GetFilteredList(OrderSearchModel model) public List<OrderViewModel> GetFilteredList(OrderSearchModel model)
{ {
var result = new List<OrderViewModel>(); var result = new List<OrderViewModel>();
if (!model.Id.HasValue)
{
return result;
}
foreach (var order in _source.Orders) foreach (var order in _source.Orders)
{ {
if ((!model.Id.HasValue || order.Id == model.Id) && if ((!model.Id.HasValue || order.Id == model.Id) &&