public static GoodInfo InfoGoodFromDto(GetGoodDto goodDto) => new GoodInfo { Id = goodDto.Id, UnitPrice = goodDto.UnitPrice, QuantityType = goodDto.QuantityType, Description = goodDto.Description ?? string.Empty };
public static Good FromDto(GetGoodDto goodDto) => new Good { Id = goodDto.Id, UnitPrice = goodDto.UnitPrice, QuantityType = goodDto.QuantityType, Description = goodDto.Description ?? string.Empty, Components = goodDto.Components .Select(c => ComponentConverter.FromDto(c)) .ToList() };