示例#1
0
 public static GoodInfo InfoGoodFromDto(GetGoodDto goodDto) => new GoodInfo
 {
     Id           = goodDto.Id,
     UnitPrice    = goodDto.UnitPrice,
     QuantityType = goodDto.QuantityType,
     Description  = goodDto.Description ?? string.Empty
 };
示例#2
0
 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()
 };