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); }
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); }