Skip to content

Change Log

Jon Wagner edited this page Sep 12, 2018 · 9 revisions

Change Log


  • Support for parsing parent/child relationships out of a single recordset. See #378 for a description
  • Async versions of AsEnumerableAsync and ForEachAsync, and cancellation support in ToListAsync
  • Fixed custom serialization issue #377


  • Fixes OLEDB parameter processing
  • Updates System.Data.Odbc reference
  • Adds UsingTransaction extension methods for connection wrappers (#370)
  • Updates MiniProfiler support to v4.0
  • Removes unnecessary sqlclient dependencies from projects


  • Addresses issue #366 - multi-level children in generated interfaces


  • Updates MySqlConnector for 0.40.3
  • Updates MySql to v8.x driver
  • Fixes #364 - issue with nullable enums


  • Added support for Mini Profiler v4.
  • Added support for OracledManaged.Core.
  • Added Sybase ASE support.
  • Adds the feature as reported on # 354 - Add TVP cache support for dynamic sql statements.
  • Fixes # 353 - parent/child support for mySql.
  • Fixes # 350 - DbType override to override default of NVarChar and use VarChar type.


  • Drops support for NET35 and NET40.
  • Fixes #339 - case-insensitive comparison in non-English locales.
  • Fixes #336 - exceptions are now properly unwrapped from AggregateExceptions.
  • Fixes #333 - upgrades ValueTuple to v4.4 with support for NET47.


  • Support for .Net Standard 2.0.
  • Added MIT License option.
  • Upgraded dependencies and drivers to latest versions.

Breaking Changes requiring recompilation:

  • Changed the way CancellationToken is defaulted as a parameter.
  • DB2 - only the x64 driver is supported.
  • Oracle - only the x64 driver is supported.

Breaking Changes:

  • FIX: #211 - DbNull no longer automatically converts to default(T) for non-nullable types.
  • Removed compatibility shim for Insight v3.x.
  • Removed the mono build target (it never was functional). Hopefully with .NET Standard, we'll be able to support it in the future.
  • Dynamic Assemblies have been renamed to avoid debugger conflicts. If Insight is accessing private fields in your objects, you need to change to [assembly:InternalsVisibleTo("Insight.Database.DynamicAssembly")]
  • Postgres - Upgraded Postgres libraries have changes to the bulk copy functionality.
  • Postgres - Upgraded Postgres libraries no longer support .NET 4.0 and earlier.
  • Postgres - Npgsql libraries no longer automatically deference refcursors when returning multiple result sets.
  • Oracle Native libraries are no longer supported
  • Sybase ASE is no longer supported until they post nuget packages


  • FIX: #322 - allow interfaces derived from IDbConnection or IDbTransaction to be used with AsParallel.


Bugfix release.

  • FIX: #242 - custom retry strategies now work with parallel connections.
  • FIX: #263 - fixed NullReferenceException when using an unmapped field in a CustomMapper
  • FIX: #292 - structures with custom serializers now work with table-valued parameters.
  • Numerous build & nuget fixes for updated tooling.


Bugfix release, with many thanks to Kevin Callahan, Bojan Resnik, Jaxel Rojas, and Keith Lawrence for fixes and testing.

  • FIX: Issue jonwagner/Insight.Database/#238: ChildClass.ParentId should map to ParentClass.Id. E.g. InvoiceLine.Invoice_ID -> Invoice.ID, MyClass.BeerId -> Beer.Id
  • FIX: Removes old type conversion code from childmapping. See Issue #266.
  • FIX: Fixing issue 265 - Allowing child list to map to parent with nullable ID
  • FIX: Refactors constructor creation for issue #257 - abstract class calling base constructor
  • Backwards compatible VS2015 debugger fix for v5.x.
  • FIX: #261 - Improve Oracle schema query performance
  • FIX: #258 - Enabled Insight to implement protected abstract methods.
  • FIX: #244 - Update nuspec file to point to Oracle.ManagedDataAccess


  • FIXED ISSUE #227 - ReliableConnetion retry should not hold open connections.


  • FIXED Issue #205 - updated to official Oracle Managed Provider
  • FIXED Issue #210 - Json serializer did not work on enumerable types
  • FIXED Issue #215 - retry with TVP would not send records to the database


  • Added more meaningful error messages when providers are not found.
  • Fixed Issue #199 - different column name overrides in related classes.


  • Fixed Issue #194 - Issue with dynamic parameters and TVPs.
  • Added a vagrant box that includes all of the test servers other than SQL Server. Requires about 10GB of space.
  • Fixed an issue converting Nullable Guids to varchar
  • Implemented Issue #194 - JSON/B data types in PostgreSQL


  • Fixed InvalidOperationException if entity has a lot of properties.
  • Fixed multiple issues with converting Guids to/from strings. (I hate Guids.)
  • Cleaned up lingering CodeAnalysis issues because I was running VS Express and now I'm back to VS Community. (Apologies if this broke something unexpected.)
  • Fixed a nagging build issue.
  • Temporarily disabled Sybase ASE tests because my server isn't working.
  • Started work on vagrant support for the test box.


  • Fixed Issue #188 - JSON build with NET40
  • Fixed Issue #189 - allow .Then.Then to continue with .ThenChildren
  • Fixed a minor issue with Compatibility3x


  • Fixed Issue #180 -ReliableConnection was not compatible with OpenWithTransaction
  • Fixed Issue #185 - ODBC provider can now use named parameters for SQL Text commands
  • ColumnAttribute can now be applied to interface parameters for renaming and other cool stuff.


  • Implemented #169 - Updated rules for detecting parent IDs when automatically calculating group by.
  • Implemented #178 - BooleanSerializers (see Object Serialization) and allow atomic fields to have custom serializers.
    • Minor Breaking Change - The signatures for some DbObjectSerializer methods have changed. If you have created a custom object serializer, it may no longer be compatible. If this is a big issue for you, let me know and I'll put in a method to maintain compatibility.
  • Fixed Issue #177 - Using Passwords with AsParallel could fail if connection is opened directly.
  • Fixed Issue #177 - some test cases fail with password authorization.
  • Fixed Issue #127 - support for multiple database/providers in the same process.
  • Updated to link to my novel so you can support Insight.Database by buying it and leaving a positive review. In case you missed it: UNDO! The True Legend of Eugene the Misconceived


  • Fixed Issue #168 - support for detecting ID fields ending in _id
  • Fixed Issue #167 - dynamic parameters can now contain enumerables for TVPs
  • Implemented Issue #164 - child recordsets can now map to single records
  • Fixed Issue #171 - wrapped providerr did not unwrap bulkcopyasync calls
  • Added missing RegisterProvider method for Postgres
  • Fixed Issue #174 - sql parameters should be case-insensitive in sql text
  • Implemented Issue #173 - new ExecuteXml methods for SqlConnections
  • Implemented Issue #175 - added an automatic schema-changing wrapper for postgres


  • Support for non-default constructors
  • Fixed #162/163 - bulk copy when a middle column is computed or readonly


  • Fixed Issue #156 - Derived classes could not override column name.
  • Added WithoutNulls methods to FastExpando (see Issue #157).
  • Fixed Issue #158 - BulkCopy fails when connection is wrapped with Glimpse.
  • Fixed Issue #159 - SingleReader fails when no records are returned.


  • Fixed Issue #154 - ExecuteScalar<string> fails when no records are returned.
  • Added ArgumentNull checks for As extension methods.


  • Fixed Issue #152 - string output variables were sending the incorrect length to the server.


  • Allow parameters & values to map into subobjects.
  • Interface methods automatically can map values into fields of objects passed in. See Issue #125.
  • Updated configuration system for custom serialization and mapping.
  • Support for composite keys in parent/child relationships. See issue #147.
  • Support for parent IDs to be part of child objects instead of just outside of them. See issue #145.
  • Optimized code generation by combining assemblies for static fields.


  • Fixed Issue #148 - generated interfaces are now in a single dynamic assembly.


  • Fixed Issue #142 - child record is atomic/value type.
  • Fixed Issue #146 - SingleChildMapper throws when no parent record is returned.


  • Optimized IL for parameter generation.
  • Implemented Issue #141 - easier custom record readers.


  • Fixed json package for NET35.
  • Updated DynamicConnection to allow providers to fixup commands.
  • Added friendlier error message when attempting to implement a private interface.
  • Fixed Issue #136 - exception thrown when interface returns List and has child records.
  • Added better exceptions when id/list fields not found on class.
  • Implemented Issued #137 - BulkCopyAsync
  • Fixed Issue #139 - support nullable return values in ExecuteScalar.


  • Fixed Issue #133 - allow custom deserialiers to deserialize any type, including strings
  • Fixed Issue #132 - added more oracle transient error codes
  • Made wrapped provider pass more calls to inner provider
  • Added option to disable MergeOutput for interface methods


  • Fixed Issue #126 - Update methods now automatically merge outputs.
  • Fixed Issue #129 - null subobjects didn't work due to sequential access on data reader
  • Fixed Issue #130 - virtual id/list accessors for child relationships throws VerificationException


  • Fixed issue #123 - OpenWithTransaction now closes inner connection rather than disposing it, so the connection can be reused.
  • Implemented Issue #124 - Oracle providers can now auto-detect output refcursors in SQLText, so you can now easily return multiple result sets.
  • Removed call to System.Activator in cloning of wrapped connections


  • Fixed Issue #117 - Oracle providers now set BindByName on commands
  • Fixed Issue #118 - DB2 and Oracle providers are now available for .NET 4.0


  • Updated library dependencies to latest versions.
  • Fixed Issue #114 - wrapped connections throw during cloning in AsParallel implementations.
  • Improved error message for empty result sets in calls to ExecuteScalar that return non-nullable values.


  • Fixed nuget package dependencies so providers depend on the latest version of the core library.
  • Column overrides in OneToOne now work in child records.
  • Private properties on parent classes can now be set.


  • Fixed Issue #111 - Xml Output Parameters
  • Fixed Issue #109 - field objects can now be created with string constructors and converters
  • Implemented Issue #112 - Added MergeOutput Attribute for interface methods
  • Implemented Issue #109 - Added MultiReader class that allows different classes to be returned for each record in a stream
  • Implemented Issue #110 - added CachedDbDataReader and PostProcessRecordReader


  • Fixed Issue #107 - VerificationException when accessing readonly field.
  • Implemented Issue #106 - more methods for As and AsParallel.
  • Fixes for TVPs in SQLText.


  • Missing provider exceptions are now more informative.
  • RegisterProvider forces registration again so Insight can be used in add-in and other scenarios.
  • Fixed schema identity caching issue when a table UDT matches a bulk copy table and their readonly properties do not match.


  • Implmented Issue #101 - SingleReader.ThenChildren now ignores ID field and maps all children to parent (unless ID field or accessor is specified).
  • Exposed RegisterProvider on all provider types so assembly references can be forced. See Issue #95.
  • Fixed bulk copy operations for wrapped connections, and KeepIdentity options.
  • Fixed Issue #102 - updated nuget packages and projects to not add a dependency on Microsoft.CSharp when building for NET35.
  • Fixed issue where a read-only or identity field would make subsequent column mappings invalid.
  • Abstract class implementation can now call a protected base class constructor.


  • Fixed provider auto-registration in more scenarios.
  • Fixed issue where column mapping was dependent upon the order of members in the class.
  • Query identities now differentiate between provider types.
  • Fixed Issue #98 - computed columns in BulkCopy.
  • Fixed Issue #97 - NullReference when calling ForEach with no results structure.
  • Can now auto-implement abstract classes derived from DbConnectionWrapper.
  • Auto-implement now fills in a IDbConnection GetConnection() method if one exists on the class.


  • Updated provider packages to only depend on core library.
  • Fixed issue where auto-registration did not work while running under IIS.
  • ISSUE #94 - FastExpandos no longer convert properties to uppercase. They now do a case-insensitive key lookup.
  • Better type support for dynamic parameters (e.g. using GUIDs with dynamic and SQL text.
  • Fixed auto-implementing derived interfaces
  • Auto-implementation now can auto-implement abstract classes.
  • Optimized execution of AsParallel interfaces.


  • The built-in providers have been split out into Insight.Database.Providers.Default.
  • New NuGet package Insight.Database.Core that omits the default providers. Handy for running on a platform that doesn't support the default providers.
  • Insight will now auto-register any provider that is installed in the application folder. Note: there is an issue with auto-registration under IIS, so using v4.1.0 is not recommended. This is fixed in v4.1.1


  • ISSUE #87 - optimization - when sending an empty list to a TVP, omit the parameter value.


  • Added support for returning arbitrary object structures.


  • FIXED ISSUE #81 - inheriting schema attribute.


  • ISSUE #76 - support output parameters with async methods.
  • FIXED ISSUE #77 - auto-interface can now return IEnumerable<T>, IList, or List<T>.
  • ISSUE #75 - allow dynamic calls to specify a database schema.
  • Added Optimistic Concurrency support.
  • Added connection.AsParallel to allow Auto Interface Implementation to generate thread-safe interfaces.



  • Fixed ISSUE #73 - exception when returning too few result sets with QueryResultsAsync
  • Fixed ISSUE #72 - default datetime is now DbType.DateTime, unless the provider supports DateTime2 (i.e. SQL)


  • Added SqlAttribute.Schema to let you specify the schema for an entire set of procedures. (Issue #65)
  • Updated SqlAttribute.CommandType to assume StoredProcedure if the sql is a single word or Text otherwise.
  • Fixed Issue #67 - DateTime2 is now downshifted to DateTime when using SQL2005 or SQL CE.
  • Fixed Issue #69 - double dispose on DbDataReader causes some third-party libraries to fail.
  • Added basic SQLite tests.


  • Added automatic JSON Serialization (Issue #60). See Object Serialization.
  • Postgres provider now supports .NET v3.5 (Issue #58). Note: if you want other providers to support .NET 3.5, please post a github issue. It shouldn't be that much work for most of them.
  • Fixed Issue #61 - when deserializing a sub-object, check to see if all of the sub-object's columns are dbnull. If so, return a null sub-object.
  • Added project icon
  • Fixed issue where commandTimeout was not being passed to a dynamic proc call


  • BulkCopy extension methods now return number of records inserted. (Issue #55, thanks eric-b)
  • Enabled streaming for SqlBulkCopy provider.
  • Added a BulkCopy extension that takes an IDataReader.


  • Added Sybase ASE Provider (Issue #52)
  • Added XML Help files to nuget packages (Issue #51)
  • Fixed Issue #50 - DynamicConnection may bypass Reliable features
  • Fixed Issue #49 - When using ReliableConnection + Dynamic + Async OR OpenWithTransaction, Connections May Not Dispose Properly


  • Fixed build process to actually package NET35 and NET40 assemblies (whoops)
  • Another Auto-Interface fix for string parameters and generics.


  • Added support for .NET 3.5
  • Fixed Issue #48 - Auto-Interface Update Method Fails if First Parameter is atomic
    • NOTE: Auto-Interface Update methods no longer perform a merge on the results. Use Upsert if that is the desired behavior. See documentation
  • Fixed Issue #47 - bulk copy inside a transaction


  • Fixed issue with sending SqlGeometry to SQL Server calls. (Issue #43)
  • Also optimized some parameter cloning & made SqlServer UDTs work better with SQL Text.


  • Added QueryResults overload with no type parameter for queries that return just output parameters.
  • Fixed Issue #41 - non-sql exceptions causing provider lookup to fail in ReliableConnection
  • Fixed Issue #42 - string to guid conversion in stored proc parameters



  • Fixed issue where a missing execute permission on a UDT used as a parameter type was causing Insight to thro the wrong exception.
  • Added DB2 Provider.



  • Fixed Issue #36 - automatic conversion of guid to string in list parameters.


  • Fixed Issue #32 - now uses DbType.DateTime2 as the default datetime type for wider range of values.


  • Fixed Issue #31 - support for table types in schemas with dotted names.
  • Fixed Issue #30 - support for case-sensitive databases.
  • Updated support for all SQL Server User-Defined Types. (Re: Issue #26)


  • New outputParameter option for connection extension methods. See Output Parameters.
    • This causes the extension methods to be incompatible with versions before v2.3. A recompile takes care of this.
  • Implemented Issue #25 - support for output parameters on Auto-Interface Implementation.
  • Added support for SqlGeometry type. (Issue #26)


  • Implemented Issue #23 - additional options for configuring SqlBulkCopy.


  • Fixed duplicate XML encoding when converting a string field to an xml column in a table-valued parameter.


  • Fixed Issue #22 - Missing Table Parameters to a stored procedure now throws an InvalidOperationException.
  • If you are calling stored procedures and omitting table parameters, relying on the default behavior of SQL server to provide an empty table, please review your code before installing this version. Insight will now throw an InvalidOperationException, to warn you that you are missing a table parameter. (Without this, it's easy to mask a bunch of bugs.) Instead you can pass in an empty list or the new Parameters.EmptyList property:
    • connection.Query("MyProc", new { Table = Parameters.EmptyList }
    • connection.MyDynamicProc(table: Parameters.EmptyList)


  • Fixed issue #21 - ObjectReader can now read byte[] and send to binary[]


  • Better automatic conversions from T => string. e.g. Guid => string.
  • Removed dependency on FxCop for code analysis. Now using Visual Studio Code Analysis.
  • Added more reliability around exception handling and disposing connections.
  • Updated build process to have fewer required dependencies.


  • Generic methods now accept <dynamic>, such as QueryResults<dynamic, dynamic> or ToList<dynamic>. One thing to note: Query<object> will now give you a FastExpando, but it's still an object...
  • Better error message if an exception occurs during deserialization type conversion.


  • Better type conversions for reading values from objects for list parameters and bulkcopy.
  • Better type conversion between .NET TimeSpan and SQL time. See Date-Based Data Types.


  • Insight now supports Auto Interface Implementation. I've been wanting this for 8 years!
  • Opening connections through DbConnectionStringBuilder or ConnectionStringSettings now return the proper connection type (not just SqlConnection).
  • Extension methods for ConnectionStringSettings now return a DbConnection rather than a SqlConnection. You may get compiler errors if you use these methods. You can cast the return type to SqlConnection or use var as appropriate.
  • For ease of use with the above change, the BulkCopy extension method now accepts any type of DbConnection, but will throw if it's not a SqlConnection.
  • Added extension methods for OpenAsync, OpenWithTransaction, and OpenWithTransactionAsync. See Transactions for great new syntax.
  • Added extension methods for Single and SingleAsync.
  • Added support for deserializing structs.


  • Fixed issue #13 - dynamic calls no longer hide SqlExceptions.
  • Fixed issue #14 - nullable parameters were not mapped properly.
  • Fixed issue #15 - single-column result sets did not deserialize nullables properly.


  • v2.0 is almost a total rewrite of the library, and it's everything you wanted for the holidays. See What is New in v2.0.

v1.2.14 (Unreleased)

  • Added ExecuteScalarAsync.
  • Fixed Issue #11 - not having EXECUTE access to a user-defined type caused the parameter to go missing with no error.


  • Fixed issue #10 - autoopen with procs that take lists of objects.


  • Added OutputParameters() to return a new object constructed from output parameters.


  • Made sure code snippets are included in the NuGet package.
  • Added support for Output Parameters.


  • Fixed support for time columns and TimeSpan values.


  • Fixed Execute stored proc with Table-Valued Parameter through a ReliableConnection.


  • Added ForEach and MultiResults code snippets. Reinstall your snippets to get them.
  • FIX: ExecuteAsync was failing on DeriveParameters with a Closed connection.


  • Much better support when coercing types between SQL and CLR. Now can convert decimal -> int, int64 -> enum32, etc.
  • Fixed issued #5 related to SCOPE_IDENTITY() returning numeric (i.e. decimal) and needing to coerce it to an int CLR field.


  • Support for converting different underlying types between Enums and DB. Now you can use tinyint in the database, and long for your Enums.

For breaking changes: bold changes require code changes. Italic changes just require recompilation.


  • Added even more methods to the repository Code Snippets to be compatible with Insight.Database.Schema AutoProcs.
  • Updated sample code to match latest Insight.Database.Schema AutoProcs.


  • ReliableConnection and ReliableCommand are now Derived from DbConnection and DbCommand for better support of async in .NET 4.5.
  • Added more exception handling for RetryStrategy.ExecuteWithRetryAsync.
  • Added Visual Studio Code Snippets for repository generation.
  • Field/Property binding is not case-insensitive.


  • Added some explicit usings around IDataReader for code explicityness.
  • Fixed returning single column of byte[].


  • NuGet package now ships .NET 4.0 and .NET 4.5 assemblies.
  • .NET 4.5 assembly now does fully asynchronous opens. No code changes on your part.
  • .NET 4.5 assembly automatically uses .NET 4.5 async SQL tasks. No code changes on your part.

See the bottom of Async Commands and Queries for some async notes.


  • Added ReliableConnection, which automatically retries database queries when a transient exception is encountered.
  • Added Async support for ReliableConnection, which required that the Async extensions be switched from SqlConnection to IDbConnection. This is better anyway, since additional connection types will eventually support async commands.


  • Added compatibility with MiniProfiler, so that when you wrap your SqlConnection in a ProfiledDbConnection, we can still detect stored procedure parameters.
  • Added support for IDataReader.Merge, that lets you merge results onto an existing object or list of objects. Handy for Identity Insert.
  • Added Insert(Sql)/InsertList(Sql) methods that let you execute an Insert statement, then take returned identities and merge them into the inserted objects. Equivalent to IDBConnection.GetReader("INSERTPROC", object(s)).Merge(object(s))
  • Added Async equivalent methods for Insert/InsertList.
  • Calling a stored proc with one table type parameter, and passing in an IEnumerable should map properly. Handy for inserts.


  • Added caching to ObjectListDbReader to improve performance and eliminate an annoying exception that pops up while debugging.


  • Passing a single object to Dynamic Database Calls now results in the object's properties being mapped to parameters, just like with Execute and Query methods.


Now in NuGet!

v1.1 contains a few breaking changes.

  • Added support for ColumnAttribute-based mapping.
  • Added support for Dynamic Database Calls with a handy connection.ProcName(params) syntax.
  • FastExpando.FromObject and .Expand no longer take type arguments and now pull properties out of the object's runtime type, not compiled type.
  • Insight methods now return IList instead of List for future-proofing. It's better for the environment, at the cost of losing .ForEach and .Sort. You'll cope. Or yell at Microsoft.
  • Changed AsyncXXX methods to XXXAsync for consistency.


  • Fixed multi-class deserializer in jit-optimized scenarios.
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.