We have a scenario to load the spatial data from sql in ASP.NET Core and .NET Standard projects. When trying to read the spatial data with sql adapter or reader we get an issue of "Microsoft.Sqlserver.Types is not loaded". We found that the package for this is not available with ASP.NET Core and .Net Standard. Hence could anyone please let us know the solution for this?
Also the nuget package that we use is System.Data.SqlClient and the nuget version is 4.8.0. Please find the sample code below and the exception is thrown when executing the code part present within the highlighted section,
`private System.Data.DataTable GetTable(DbConnection dbConnection, SqlCommand command)
{
using (command.Connection = (SqlConnection)dbConnection)
{
System.Data.DataTable dtable = new System.Data.DataTable();
using (SqlDataAdapter dAdapter = new SqlDataAdapter(command))
{
System.Data.DataSet dset = new System.Data.DataSet();
dAdapter.Fill(dset);
if (dset.Tables.Count > 0)
dtable = dset.Tables[0];
}
return dtable;
}
}
`
Please find a snap of the error thrown below,

We have a scenario to load the spatial data from sql in ASP.NET Core and .NET Standard projects. When trying to read the spatial data with sql adapter or reader we get an issue of "Microsoft.Sqlserver.Types is not loaded". We found that the package for this is not available with ASP.NET Core and .Net Standard. Hence could anyone please let us know the solution for this?
Also the nuget package that we use is System.Data.SqlClient and the nuget version is 4.8.0. Please find the sample code below and the exception is thrown when executing the code part present within the highlighted section,
`private System.Data.DataTable GetTable(DbConnection dbConnection, SqlCommand command)
{
using (command.Connection = (SqlConnection)dbConnection)
{
System.Data.DataTable dtable = new System.Data.DataTable();
`
Please find a snap of the error thrown below,
