public static Agents.AutoService.Models.Auto ConvertAuto(Entities.Auto auto) { var newAuto = new Agents.AutoService.Models.Auto() { Id = auto.Id == 0 ? new long?() : auto.Id, Kenteken = auto.Kenteken, KlantId = auto.KlantId == 0 ? new long?() : auto.KlantId, Type = auto.Type }; return(newAuto); }
public static Entities.Auto ConvertAuto(Agents.AutoService.Models.Auto auto) { var newAuto = new Entities.Auto() { Id = auto.Id.HasValue ? auto.Id.Value : 0, Kenteken = auto.Kenteken, KlantId = auto.KlantId.HasValue ? auto.KlantId.Value : 0, Type = auto.Type }; return(newAuto); }