# Importing geopoint from SQLserver using EntityFramework

**URL:** <https://discuss.elastic.co/t/importing-geopoint-from-sqlserver-using-entityframework/30031>\
**Category:** Elasticsearch\
**Created:** [September 25, 2015, 4:01pm UTC](https://discuss.elastic.co/t/importing-geopoint-from-sqlserver-using-entityframework/30031 "2015-09-25T16:01:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wittmaack](https://avatars.discourse-cdn.com/v4/letter/w/b9e5f3/32.png) [@wittmaack](https://discuss.elastic.co/u/wittmaack)\
**Post date:** [September 25, 2015, 4:01pm UTC](https://discuss.elastic.co/t/importing-geopoint-from-sqlserver-using-entityframework/30031/1 "2015-09-25T16:01:55Z")

</div>

I'm trying to import a location from a table in SQLServer to a geo\_point type. I'm using the Entity Framework in Visual Studio. I have to admit I have little experience in programming but I've managed to survive - until now 😄

The column definitions look like this  
[location.lon] [float] NULL,  
[location.Lat] [float] NULL

The ES mapping definition looks like this  
[ElasticsearchGeoPoint]  
public GeoPoint location { get; set; }

The intention was to end up with a structure looking like this:  
{  
"mappings": {  
"restaurant": {  
"properties": {  
"name": {  
"type": "string"  
},  
"location": {  
"type": "geo\_point"  
}  
}  
}  
}  
}

The load of data fails in ElasticSearch.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:48pm UTC](https://discuss.elastic.co/t/importing-geopoint-from-sqlserver-using-entityframework/30031/2 "2017-07-05T23:48:02Z")

</div>

Closed on July 5, 2017, 11:48pm UTC


