docs/index.md
A brief guide is available on github
Questions on Stack Overflow should be tagged dapper
From NuGet:
Install-Package Dapper
or
Install-Package Dapper.StrongName
Note: to get the latest pre-release build, add -Pre to the end of the command.
RELEASE NOTE TRACKING HAS MOVED TO GITHUB
See: https://github.com/DapperLib/Dapper/releases
Archive only (no new entries):
(note: new PRs will not be merged until they add release note wording here)
SupportLegacyParameterTokens setting to enable or disable single-character parameter tokens (#1974 via @Giorgi)$ addition for legacy parameter tokens (#1979 via @mgravell)GetConstructorParameter (#1980 via @mgravell, fixes #1969)GridReader.ReadUnbufferedAsync API (#1958 via @mgravell)GridReader API to allow it to be subclassed by external consumers (#1928 via @mgravell)$ as a parameter prefix (#1952 via @Giorgi)FetchSize setting for use with Oracle (#1946 via mgravell, fixes #1945) (also add some missing logic in Settings.Reset())AsyncEnumerable<dynamic> QueryUnbufferedAsync(...) API (#1925 via mgravell, fixes #1922)struct types as readonly (#1925 via mgravell)IDataReader, and implement missing DbDataReader async APIs (#1913 via mgravell)SqlDecimal and other types that need to be accessed via DbDataReader.GetFieldValue<T>AddTypeMap that supports DbDataReader.GetFieldValue<T> for additional typesDbDataReader; this has been true (via DbConnection) for async foreverAsyncEnumerable<T> QueryUnbufferedAsync<T>(...) and GridReader.ReadUnbufferedAsync<T>(...) APIs (.NET 5 and later)IAsyncDisposable on GridReader (.NET 5 and later).Query<int[]>) on supported platforms (e.g. Postgres) (#1598 via DarkWanderer)SqlMapper.HasTypeHandler is made public for consumers (#1405 via brendangooden)DbString.ToString() (#1665 via NickCraver)DbType for date/time types is no longer explicitly specified (resolves Npgsql v6 issue)Settings.UseIncrementalPseudoPositionalParameterNames, to support "snowflake" parameter naming conventionsDynamicParameters loop bug - wrong index (#1443 via DamirAinullin)SqlBuilder (#1404 via Wei)SqlBuilder (#1369 via shps951023)DeleteAsync (#1309 via james-hester-ah)char on Postgres (#1326 via jjonescz)Primary changes:
<PackageReference> for their project to build, if they were previously relying on Dapper to provide System.Data.SqlClientAsTableValuedParameter(this IEnumerable<SqlDataRecord>) extension method is now AsTableValuedParameter<T>(this IEnumerable<T>) where T : IDataRecord; this is a breaking change but should be code-compatible and just requires a rebuildIdentity not enforcing type identity of multi-mapped typesOther changes merged:
ExecuteReaderAsync overload to expose DbDataReaderIN and similar clauses in some scenariosDispose() polymorphic in "rainbow".Connection available in "rainbow"DapperRow (enables UI binding with non-generic Query() API)SqlMapper.Parse consistent with QueryImplQueryAsyncDapperRow now implements IReadOnlyDictionary<string, object>Async when the provided IDbConnection is not a DbConnectionGetAll now handles nullable typesnetstandard2.0)SqlClient dependency to 4.4.0 (to help propagate the newer client)in expansions using ODBC pseudo-positional arguments)string_split is used for InListStringSplitCountInListStringSplitCount global setting; if set (non-negative), in @foo expansions (of at least the specified size) of primitive types (int, tinyint, smallint, bigint) are implemented via the SQL Server 2016 (compat level 130) STRING_SPLIT functionGridReader (#254)PadListExpansions to work correctly with not in scenarios; now uses last non-null value instead of null; if none available, don't padGetRowParser<T> extension method on IDataReader API - allows manual construction of discriminated unions, etcSettings.PadListExpansions - reduces query-plan saturation by padding list expansions with null values (opt-in, because on some DB configurations this could change the meaning) (note: bad choice of null revised in 1.50-beta9)Settings.ApplyNullValues - assigns (rather than ignores) null values when possibleLookupDbType method available againGetRowParser(Type) (and refactor the backing store for readers to suit)SqlDataRecord handlingQueryFirstOrDefault / ReadFirstOrDefault methods that optimize the single-row scenariodynamic usage from the async APIDynamicTypeMap public again (error during core-clr migration)Hashtable again on core-clrdnx451 support in addition to dotnet5.4 (aka netstandard1.4)SqlMapper.cs as it was becoming too unmaintainable; NuGet is now the only supported deployment channelSqlMapper.Settings added; provides high-level global configuration; initially CommandTimeout (@Irrational86)Type[] support for GridReader.Read scenarios (@NikolayGlynchak)QueryAsync<T> (@phnx47, #346)UdtTypeName (@perliedman)SqlDataRecord (@sqmgh)DbString default for IsAnsi to be specified (@kppullin)TypeMapProvider with lazy func-based initialization (@garyhuntddn).Get<T> is called before the command is executed{=val} boolean replacementsSqlBuilder projectGetValues() on Mono; add AsList()IWrappedDataReader)ExpandoObject etc); Fix Issue #182 (better support for db-type when using object values);DbString/Oracle bug (via Mauro Cerutti); new support for named positional argumentsSqlHierarchyId (core)SqlGeometry (core) and DbGeometry (EF)SqlGeography in core libraryFoo_Bar to FooBar (etc); ExecuteScalar added; stability fixes