Модель

This commit is contained in:
dasha 2023-03-19 12:20:57 +04:00
parent 50c0cdc17e
commit f997e6fc06

View File

@ -41,14 +41,9 @@ namespace SushiBarFileImplement.Implements
private OrderViewModel GetViewModel(Order order)
{
var viewModel = order.GetViewModel;
foreach (var sushi in source.ListSushi)
{
if (sushi.Id == order.SushiId)
{
var sushi = source.ListSushi.FirstOrDefault(x => x.Id == order.SushiId);
if (sushi == null) return null;
viewModel.SushiName = sushi.SushiName;
break;
}
}
return viewModel;
}
public OrderViewModel? Insert(OrderBindingModel model)