Правки.
This commit is contained in:
parent
a55f771ecf
commit
25869a56bf
@ -79,8 +79,8 @@ namespace SushiBarFileImplement.Implements
|
||||
|
||||
private OrderViewModel? AttachSushiName(OrderViewModel? model)
|
||||
{
|
||||
var sushi = source.Sushis.FirstOrDefault(x => x.Id == model?.SushiId);
|
||||
model?.GetType().GetProperty("SushiName")?.SetValue(model, sushi?.SushiName);
|
||||
var sushi = model?.SushiId != null ? source.Sushis.FirstOrDefault(x => x.Id == model.SushiId) : null;
|
||||
model.SushiName = sushi?.SushiName;
|
||||
return model;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user