public static PositionAuditViewModel FromPushpin(Pushpin pushpin)
        {
            if (null == pushpin)
                return null;

            return new PositionAuditViewModel()
            {
                Timestamp = pushpin.Timestamp,
                Latitude = pushpin.Latitude.HasValue ? (double?)pushpin.Latitude.Value : null,
                Longitude = pushpin.Longitude.HasValue ? (double?)pushpin.Longitude.Value : null,
                Description = pushpin.Description
            };
        }
Exemple #2
0
        public virtual void AddPushpin(Pushpin pushpin)
        {
            if (null == pushpin)
                return;

            pushpin.Trip = this;
            this.Pushpins.Add(pushpin);
        }