Модель
This commit is contained in:
parent
50c0cdc17e
commit
f997e6fc06
@ -41,14 +41,9 @@ namespace SushiBarFileImplement.Implements
|
|||||||
private OrderViewModel GetViewModel(Order order)
|
private OrderViewModel GetViewModel(Order order)
|
||||||
{
|
{
|
||||||
var viewModel = order.GetViewModel;
|
var viewModel = order.GetViewModel;
|
||||||
foreach (var sushi in source.ListSushi)
|
var sushi = source.ListSushi.FirstOrDefault(x => x.Id == order.SushiId);
|
||||||
{
|
if (sushi == null) return null;
|
||||||
if (sushi.Id == order.SushiId)
|
|
||||||
{
|
|
||||||
viewModel.SushiName = sushi.SushiName;
|
viewModel.SushiName = sushi.SushiName;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return viewModel;
|
return viewModel;
|
||||||
}
|
}
|
||||||
public OrderViewModel? Insert(OrderBindingModel model)
|
public OrderViewModel? Insert(OrderBindingModel model)
|
||||||
|
Loading…
Reference in New Issue
Block a user