Esempio n. 1
0
        public void ConvertFromLogEntity(DriverLocation entity)
        {
            this.DriverId   = entity.DriverId;
            this.LocationId = entity.LocationId;
            this.StatusId   = entity.StatusId;

            if (entity.Driver != null)
            {
                this.Driver = new DriverDTO(entity.Driver);
            }

            if (entity.Location != null)
            {
                this.Location = new LocationLagLonDTO(entity.Location);
            }

            if (entity.Status != null)
            {
                this.Status = new DriverStatusDTO(entity.Status);
            }
        }
Esempio n. 2
0
        public override void ConvertFromEntity(DriverLocationLog entity)
        {
            base.ConvertFromEntity(entity);

            this.DriverId   = entity.DriverId;
            this.LocationId = entity.LocationId;
            this.StatusId   = entity.StatusId;

            if (entity.Driver != null)
            {
                this.Driver = new DriverDTO(entity.Driver);
            }

            if (entity.Location != null)
            {
                this.Location = new LocationLagLonDTO(entity.Location);
            }

            if (entity.Status != null)
            {
                this.Status = new DriverStatusDTO(entity.Status);
            }
        }