{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/3034","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/3034/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/3034/comments","events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/3034/events","html_url":"https://github.com/aspnet/EntityFramework/issues/3034","id":105018116,"number":3034,"title":"Geography field mapping add 'TempId1' to column name","user":{"login":"unairoldan","id":933970,"avatar_url":"https://avatars.githubusercontent.com/u/933970?v=3","gravatar_id":"","url":"https://api.github.com/users/unairoldan","html_url":"https://github.com/unairoldan","followers_url":"https://api.github.com/users/unairoldan/followers","following_url":"https://api.github.com/users/unairoldan/following{/other_user}","gists_url":"https://api.github.com/users/unairoldan/gists{/gist_id}","starred_url":"https://api.github.com/users/unairoldan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unairoldan/subscriptions","organizations_url":"https://api.github.com/users/unairoldan/orgs","repos_url":"https://api.github.com/users/unairoldan/repos","events_url":"https://api.github.com/users/unairoldan/events{/privacy}","received_events_url":"https://api.github.com/users/unairoldan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"smitpatel","id":1528107,"avatar_url":"https://avatars.githubusercontent.com/u/1528107?v=3","gravatar_id":"","url":"https://api.github.com/users/smitpatel","html_url":"https://github.com/smitpatel","followers_url":"https://api.github.com/users/smitpatel/followers","following_url":"https://api.github.com/users/smitpatel/following{/other_user}","gists_url":"https://api.github.com/users/smitpatel/gists{/gist_id}","starred_url":"https://api.github.com/users/smitpatel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smitpatel/subscriptions","organizations_url":"https://api.github.com/users/smitpatel/orgs","repos_url":"https://api.github.com/users/smitpatel/repos","events_url":"https://api.github.com/users/smitpatel/events{/privacy}","received_events_url":"https://api.github.com/users/smitpatel/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/aspnet/EntityFramework/milestones/8","html_url":"https://github.com/aspnet/EntityFramework/milestones/Investigation","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/milestones/8/labels","id":666133,"number":8,"title":"Investigation","description":"This release is used to track work items that need to be investigated to determine if they are legitimate issues and whether they should be fixed in the current release.\r\n<!--\r\n@huboard:{\"order\":-2}\r\n-->","creator":{"login":"rowanmiller","id":4741851,"avatar_url":"https://avatars.githubusercontent.com/u/4741851?v=3","gravatar_id":"","url":"https://api.github.com/users/rowanmiller","html_url":"https://github.com/rowanmiller","followers_url":"https://api.github.com/users/rowanmiller/followers","following_url":"https://api.github.com/users/rowanmiller/following{/other_user}","gists_url":"https://api.github.com/users/rowanmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/rowanmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rowanmiller/subscriptions","organizations_url":"https://api.github.com/users/rowanmiller/orgs","repos_url":"https://api.github.com/users/rowanmiller/repos","events_url":"https://api.github.com/users/rowanmiller/events{/privacy}","received_events_url":"https://api.github.com/users/rowanmiller/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":27,"state":"open","created_at":"2014-05-21T19:27:44Z","updated_at":"2015-09-08T23:01:06Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-09-05T09:59:23Z","updated_at":"2015-09-08T23:02:04Z","closed_at":null,"body":"I am creating an API usign Asp.Net 5 (beta 6), with Entity Framework 7.0.0-beta6.\r\n\r\nThis is the **project.json** file:\r\n\r\n```\r\n{\r\n  \"dependencies\": {\r\n    \"System.Collections\": \"4.0.10-beta-*\",\r\n    \"System.Linq\": \"4.0.0-beta-*\",\r\n    \"System.Threading\": \"4.0.10-beta-*\",\r\n    \"Microsoft.CSharp\": \"4.0.0-beta-*\",\r\n    \"Microsoft.AspNet.Mvc\": \"6.0.0-beta6-*\",\r\n    \"EntityFramework.SqlServer\": \"7.0.0-beta6\",\r\n    \"Microsoft.Spatial\": \"6.13.0\"   // I have also tried with System.Spatial\r\n  },\r\n\r\n  \"frameworks\": {\r\n    \"dnx451\": { },\r\n    \"dnxcore50\": { }\r\n  }\r\n}\r\n```\r\n\r\nAnd here is my **model** and **EF entity**:\r\n\r\n```\r\n    public class Address\r\n    {\r\n        public int CompanyId { get; set; }\r\n        public string CountryId { get; set; }\r\n        public string AreaId { get; set; }\r\n        public string City { get; set; }\r\n        public decimal Latitude { get; set; }\r\n        public decimal Longitude { get; set; }\r\n        public Geography Location { get; set; }\r\n        public DateTime UpdatedAt { get; set; }\r\n    }\r\n\r\nCREATE TABLE [Company].[Address]\r\n(\r\n\t...other fields\r\n\r\n\t[Location] GEOGRAPHY NOT NULL,\r\n\r\n\t...other fields\r\n)\r\nGO\r\n```\r\n\r\nAll the fields in my entity Address (and in every entity in my project) is working and is correctly mapped, but in case of Geography field, in this case called \"Location\", I get this error:\r\n```\r\nSystem.Data.SqlClient.SqlException\r\nInvalid column name 'LocationTempId1'.\r\nat System.Data.SqlClient.SqlCommand.<>c__DisplayClass16.<ExecuteDbDataReaderAsync>b__17(Task<SqlDataReader> result) \r\nat System.Threading.Tasks.ContinuationResultTaskFromResultTask<TAntecedentResult, TResult>.InnerInvoke() \r\nat System.Threading.Tasks.Task.Execute() \r\nat System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) \r\nat System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) \r\nat System.Runtime.CompilerServices.TaskAwaiter<TResult>.GetResult() \r\nat Microsoft.Data.Entity.Query.AsyncQueryingEnumerable.AsyncEnumerator.<MoveNext>d__5.MoveNext()\r\n```\r\n\r\nEF is trying to get the column LocationTempId1, I do not the reason.\r\n\r\nI have tried to solve adding the explicit column mapping in my model definition, but it does not work:\r\n```\r\nentity.Property(a => a.Location).HasColumnName(\"Location\");\r\n```\r\n**Does anyone know how to solve this issue?**\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/comments/138726740","html_url":"https://github.com/aspnet/EntityFramework/issues/3034#issuecomment-138726740","issue_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/3034","id":138726740,"user":{"login":"rowanmiller","id":4741851,"avatar_url":"https://avatars.githubusercontent.com/u/4741851?v=3","gravatar_id":"","url":"https://api.github.com/users/rowanmiller","html_url":"https://github.com/rowanmiller","followers_url":"https://api.github.com/users/rowanmiller/followers","following_url":"https://api.github.com/users/rowanmiller/following{/other_user}","gists_url":"https://api.github.com/users/rowanmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/rowanmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rowanmiller/subscriptions","organizations_url":"https://api.github.com/users/rowanmiller/orgs","repos_url":"https://api.github.com/users/rowanmiller/repos","events_url":"https://api.github.com/users/rowanmiller/events{/privacy}","received_events_url":"https://api.github.com/users/rowanmiller/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T23:02:04Z","updated_at":"2015-09-08T23:02:04Z","body":"@smitpatel can you also follow up with us about the exception we do throw in this case so that we can verify it is something we are happy with"}}