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);
        }
Пример #3
0
        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);
        }
Пример #4
0
        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);
        }
Пример #5
0
        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);
        }
Пример #6
0
 public void DeleteVehicleEvent(VehicleEventDto e)
 {
     throw new NotImplementedException();
 }
Пример #7
0
 public void SubmitVehicleEvent(VehicleEventDto e)
 {
     throw new NotImplementedException();
 }