Модель
This commit is contained in:
parent
50c0cdc17e
commit
f997e6fc06
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user