“Specified type is not registered” error when bulk inserting table with geospatial data types
问题 I'm trying to use the SqlBulkCopy class from the System.Data assembly (4.6.1) to bulk insert a table with a geospatial data type, using code that looks roughly like this (adapted from https://github.com/MikaelEliasson/EntityFramework.Utilities): public void InsertItems<T>(IEnumerable<T> items, string schema, string tableName, IList<ColumnMapping> properties, DbConnection storeConnection, int? batchSize) { using (var reader = new EFDataReader<T>(items, properties)) { var con = (SqlConnection