When trying to convert a string as below
52.0986413 5.2171528
to a variable of type DbGeometry
like this
Geometry
I found the answer when I reinstalled Microsoft.SqlServer.Types.
For ASP.NET applications, add the following line of code to the Application_Start method in Global.asax.cs:
SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~/bin"));
For desktop applications, add the following line of code to run before any spatial operations are performed:
SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);
This fixed it for me