Exemple #1
0
        public LocationDto ToLocationDto(EditableLocation entity)
        {
            var dto = new LocationDto()
            {
                Key                = entity.Key,
                Name               = entity.Name,
                Latitude           = entity.Latitude,
                Longitude          = entity.Longitude,
                GeocodeStatus      = entity.GeocodeStatus.ToString(),
                DbGeogNeedsUpdated = entity.DbGeogNeedsUpdated,
                LocationTypeKey    = entity.LocationTypeKey,
                UpdateDate         = entity.UpdateDate,
                CreateDate         = entity.CreateDate
                                     //Viewport = entity.Viewport.ToString(),
            };

            return(dto);
        }
Exemple #2
0
        public EditableLocation ToLocationEntity(LocationDto dto)
        {
            var Entity = new EditableLocation()
            {
                Key                = dto.Key,
                Name               = dto.Name,
                Latitude           = dto.Latitude,
                Longitude          = dto.Longitude,
                Coordinate         = new Coordinate(dto.Latitude, dto.Longitude),
                GeocodeStatus      = DoGeocoding.GetGeocodeStatus(dto.GeocodeStatus),
                DbGeogNeedsUpdated = dto.DbGeogNeedsUpdated,
                LocationTypeKey    = dto.LocationTypeKey,
                UpdateDate         = dto.UpdateDate,
                CreateDate         = dto.CreateDate
                                     //Viewport = new Viewport(dto.Viewport),
            };

            return(Entity);
        }