Exemple #1
0
 public static Vehicle AsEntity(this VehicleDocument document)
 => document is null? null : new Vehicle(
     document.Id,
     document.Brand,
     document.Model,
     document.Description,
     document.PayloadCapacity,
     document.LoadingCapacity,
     document.PricePerService,
     document.Variants);
Exemple #2
0
 public static VehicleDto AsDto(this VehicleDocument document)
 => new VehicleDto
 {
     Id              = document.Id,
     Brand           = document.Brand,
     Model           = document.Model,
     Description     = document.Description,
     PayloadCapacity = document.PayloadCapacity,
     LoadingCapacity = document.LoadingCapacity,
     PricePerService = document.PricePerService,
     Variants        = document.Variants.ToString().Split(',')
 };