public void Delete(VehicleEvent ev) { VehicleEventDto dto = VehicleEventAssembler.FromDomainObjectToDto(ev); service.DeleteVehicleEventCompleted += OnRemoved; service.DeleteVehicleEventAsync(dto); }
public void Persist(VehicleEvent ev) { VehicleEventDto dto = VehicleEventAssembler.FromDomainObjectToDto(ev); service.SubmitVehicleEventCompleted += OnChangesSubmitted; service.SubmitVehicleEventAsync(dto); }
public static VehicleEvent FromDtoToDomainObject(VehicleEventDto source) { VehicleEvent target = new VehicleEvent(); target.Id = source.Id; target.Comment = source.Comment; target.Date = source.Date; target.Mileage = source.Mileage; target.NextReplacementPeriod = source.NextReplacementPeriod; target.RedMileage = source.RedMileage; target.Type = (VehicleEventType)source.Type; target.VehicleId = source.VehicleId; target.YellowMileage = source.YellowMileage; return(target); }
public static VehicleEventDto FromEntityToDto(VehicleEvent source) { VehicleEventDto target = new VehicleEventDto(); target.Id = source.Id; target.Comment = source.Comment; target.Date = source.Date; target.Mileage = source.Mileage; target.NextReplacementPeriod = source.NextReplacementPeriod; target.RedMileage = source.RedMileage; target.Type = source.Type; target.VehicleId = source.VehicleEntityId; target.YellowMileage = source.YellowMileage; return(target); }
public static VehicleEventDto FromDomainObjectToDto(VehicleEvent source) { var target = new VehicleEventDto(); target.Comment = source.Comment; target.Date = source.Date; target.Id = source.Id; target.Mileage = source.Mileage; target.NextReplacementPeriod = source.NextReplacementPeriod; target.RedMileage = source.RedMileage; target.Type = (int)source.Type; target.VehicleId = source.VehicleId; target.YellowMileage = source.YellowMileage; return(target); }
public void DeleteVehicleEvent(VehicleEventDto e) { throw new NotImplementedException(); }
public void SubmitVehicleEvent(VehicleEventDto e) { throw new NotImplementedException(); }