解决方法
对于迟到的回应抱歉,但是在寻找别的东西时看到了这一点.
只需执行以下操作:
sqlGeography theGeography; int srid = 4326; // or alternative DbGeography newGeography = DbGeography.FromText(theGeography.ToString(),srid);
要扭转它:
DbGeography theGeography; sqlGeography newGeography = sqlGeography.Parse(theGeography.AsText()).MakeValid();
希望有帮助!