PIbd-22_Kurbanova_A.A._LabWork.2 #2 #2
@ -25,10 +25,11 @@ namespace TypographyFileImplement.Implements
|
||||
private OrderViewModel DefinePrintedName(OrderViewModel model)
|
||||
{
|
||||
string? printedName = source.Printeds.FirstOrDefault(x => model.PrintedId == x.Id)?.PrintedName;
|
||||
if (printedName != null)
|
||||
if (printedName == null)
|
||||
|
||||
{
|
||||
model.PrintedName = printedName;
|
||||
return null;
|
||||
}
|
||||
model.PrintedName = printedName;
|
||||
return model;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user
Можно без if: viewModel.<Название продукта> = <элемент>?.<Название продукта>;