164 Commits

Author SHA1 Message Date
Marc Gravell 8152f2c718 WIP: Lib updates and prepare for Microsoft.Data.SqlClient (#1313)
v2 work; primarily prep for split SqlClient
2019-08-28 15:07:32 +01:00
Jonathan Channon a5256b7d94 Remove .NET 45 in XML docs (#1271) 2019-06-03 14:05:12 +01:00
Wixely b961089eff Improve Exception message (#1154)
In cases where the object has a property named ID, the property will automatically be assigned as [Key], even if [Computed] is added manually in an attempt to override it. This can cause confusion, this exception will be thrown despite the code looking fine and there only being one [ExplicitKey] defined. I've added this extra line of information to help diagnosis.
2019-02-09 07:19:33 -05:00
Nick Craver 2a2ff86561 Fix Dapper.Contrib to prefer its attribute but still fall back to others 2018-09-11 20:59:15 -04:00
Alex Wiese 1367853feb Update SqlMapperExtensions.Async.cs
Use adapter to format column name equals, bringing it in line with `Delete` behaviour.
2018-07-01 06:29:36 -04:00
Alex Wiese 271af11beb Update SqlMapperExtensions.Async.cs
Made the same fix to `InsertAsync`
2018-07-01 06:22:11 -04:00
Alex Wiese 307ab7eae8 Update SqlMapperExtensions.Async.cs
#418 - `Update` was fixed but `UpdateAsync` was not fixed.
2018-07-01 06:22:11 -04:00
Brian Drupieski 39b1fd5a13 IEnumerable<T> check when updating and deleting 2018-05-14 06:44:11 -04:00
Sergey fc38c4234f Removing unjustified use of AppendFormat in StringBuilder class (#989) 2018-03-30 17:32:28 -04:00
Brian Drupieski 6e9099d68e fix Insert<T> when T is declared as IEnumerable<T> (#948) 2018-03-29 21:12:46 -04:00
Jase 07fe543f15 Change to GetAll to allow the usage of a nullable type in T when T is an interface… #933 (#936)
* Change to GetAll to allow the usage of a nullable type in T when T is an interface.

* Change to GetAll to allow the usage of a nullable type in T when T is an interface: further change to check if val == null and if so then don't try to assign it as a property value.

* Change to Get to allow the usage of a nullable type in T when T is an interface. (effectively the same change as the previous change to GetAll.)

* Change to GetAsync and GetAllAsync to allow the usage of a nullable type in T when T is  an interface.

* Added in UserWithNullableDob and IUserWithNullableDob.

Added in tests for GetAndGetAllWithNullableValues and  GetAsyncAndGetAllAsyncWithNullableValues.

* Added in .ConfigureAwait(false) in the GetAsync Test.
Added comment to identify which issue the test relates to.

* Added NullableDates tables to the test databases.
Adjusted variable names in GetAndGetAllWithNullableValues and GetAsyncAndGetAllAsyncWithNullableValues.

* Changed IUserWithNullableDob to INullableDate.
2018-03-09 06:41:01 -08:00
Brian Drupieski d269a5a4b8 when inserting, check if type implements IEnumerable<T> to determine if it's a collection (#880)
* when inserting check if type implements IEnumerable<T> to determine if it's a collection
* when inserting, check if type is a collection by comparing its implemented interfaces to unbound generic type IEnumerable<> instead of the name "IEnumerable`1"
2017-11-25 20:37:19 -05:00
Nick Craver e2ebdb08ac Dapper.Contrib: netstandard2.0 2017-09-14 10:37:18 -04:00
Nick Craver 071a3fd5a0 .editorconfig and formatting 2017-08-21 16:25:48 -04:00
Nick Craver 7b34be3a25 net40 is dead - remove #if ASYNC bits 2017-08-21 15:25:57 -04:00
Nick Craver 01c6a13967 Merge remote-tracking branch 'origin/master' into netstandard2 2017-08-20 15:46:39 -04:00
Nick Craver 4637c10097 Upgade libs, fix tests
This uses the new non-parallel-at-the-end I added to xUnit in https://github.com/xunit/xunit/pull/1411 This way we can run any global test that are other-test-unfriendly much more easily.
2017-08-20 14:06:27 -04:00
GermanTikhonov23 f39cff338c Fix for InsertAsync in PostgresAdapter (#689)
* Fix for PostgresAdapter in SqlMapperExtensions.Async. Copied same line of code from SqlMapperExtensions to fix RuntimeBinderException on InsertAsync
* Cleanup
2017-05-13 23:17:10 -04:00
Nick Craver 7e5bd308f9 netstandard2.0 functionality (w/ runtime breaks)
This adds a netstandard2.0 build to Dapper (and StrongName until v2),
adds a netstandard2.0 test lineup, restores most functionality (except
UDTs for SQL, e.g. .UdtTypeName isn't in netstandard2), and also breaks
things not actually implemented or implemented correctly in
netstandard2.0. Pushing this up so we can work through these with the
.NET teams.

Several things are still broken here (and fail tests):
- Parameter decimal values (not filed yet)
- DataTables as parameters
(https://github.com/dotnet/corefx/issues/19708)
- .GetSchemaTable() (not yet filed, implementation is completely missing
from SqlDataReader in CoreFX)

While the compile is clean, the above are runtime issues.
`SqlParameter.UdtTypeName` is a separate issue, that one just wasn't in
`netstandard2.0` at all...so we can't support UDTs there until it is.
See https://github.com/dotnet/corefx/issues/17126 for details.
2017-05-12 10:03:00 -04:00
Nick Craver c3b2b34b54 Documentation: contrib 2017-05-08 14:46:34 -04:00
Nick Craver f613234413 Lots of code cleanup, no functional changes 2017-05-07 15:49:01 -04:00
Nick Craver 4be8df7988 Lots of documentation fixes/additions. 2017-05-06 18:57:10 -04:00
Nick Craver ae7a29a9f1 VS 2017 .csproj Migration
Due to the way VS test works (by injecting an executable entry point), the performance tests needed to be factored out. I also organized all of our existing tests better along the way.
Actual code changes to Dapper itself are very minor, only formatting and documentation fixes (which we need many more of).

The build.ps1 script is upated to work, but note that <frameworkAssemblies> is not working in .nuspec inside the packages in the new .csproj system. I consider this to be a blocker. Issue is here: https://github.com/NuGet/Home/issues/4853
2017-03-25 19:34:10 -04:00
Nick Craver f0bbbab8e5 Rename package to "Dapper"
Related: #683
2017-02-08 21:27:14 -05:00
Nick Craver a7ff0b3d9f Fix missing Firebase Async, issue #695
TODO: All of these need race love in V2, complete re-vamp.
2017-02-08 21:22:50 -05:00
Nick Craver 01acca6c76 Merge pull request #651 from pdesterlich/master
added firebird support
2017-01-28 05:27:27 -08:00
Mark Bell 11ec77eaaf Update README with documentation for [ExplicitKey] attribute 2017-01-19 11:15:23 +00:00
Phelipe de Sterlich 16d8691892 added firebird support
added firebird sql adapter to allow record insert and key retrieving
2016-12-01 11:38:38 +01:00
Rick van Lieshout 63ec8912f1 Operate on db records instead of files. 2016-08-24 21:27:47 +02:00
Marc Gravell e15cb95d92 1.50.2 2016-07-22 14:53:06 +01:00
Marc Gravell 2b9a3d489a Failing test for #552 2016-07-20 13:28:21 +01:00
Nick Craver f25f0724f5 Merge pull request #538 from cremor/fix-syntax-errors
Fixed some syntax errors in project.json files
2016-06-29 06:21:21 -04:00
Nick Craver be5f196546 .Net Core 1.0 RTM update 2016-06-28 17:48:50 -04:00
cremor 855d8e0aca Fixed some syntax errors in project.json files. 2016-06-16 12:02:18 +02:00
Nick Craver 2c531d2c06 This .0 addition happens automatically...make it explicit instead. 2016-05-24 08:57:33 -04:00
Nick Craver 3d4d251a78 Switch version suffix to be a build parameter
Note: build.sh needs love from OS X/*nix later to match
2016-05-24 08:38:24 -04:00
Nick Craver 41f1fe3e3c .xproj: RC2 upgrade
This fixes null refs with the DNX MSBuild targets when building from
Visual Studio.
2016-05-24 07:29:18 -04:00
Nick Craver 8e070ddca5 Interfaces are back, simplifying code.
Related issue: #520
2016-05-23 20:43:30 -04:00
Nick Craver ad5378fcb0 RC2 Version bump, since we locked ourselves in with semver on beta9 2016-05-19 11:34:16 -04:00
Nick Craver 84a7d6464a RC2 master merge 2016-05-19 08:53:36 -04:00
Nick Craver ee615c0cc3 Upgrade project.json files to RC2 format.
Note: on a nuspec comparison, the following dependencies aren't there
anymore: Microsoft.CSharp, mscorlib, System, and System.Core aren't
explicitly specified in frameworkAssemblies anymore. The only one of
these I can imagine mattering is Microsoft.CSharp.
2016-05-17 09:48:01 -04:00
Nick Craver 10581e867e Update to RC2 final build (24027) libraries. Also bump to beta10 2016-05-16 20:54:26 -04:00
Nick Craver 7edadbd4c9 .Net Core: remove floating versions (use stable ones on Nuget.org) and get this puppy back in action.
Also: it's 2016.
2016-04-17 16:42:13 -04:00
Oren Novotny cf732e0d98 Get building 2016-04-16 21:57:07 -04:00
Oren Novotny dfff5f3724 fix outpt paths 2016-04-16 20:22:59 -04:00
Marc Gravell 2b4bb22dbd 1.50-beta9 2016-04-01 09:47:54 +01:00
Marc Gravell 4da982e2c7 Heh, AspNet and DNX (only) work in VS2015; DNX and DotNet (only) work in VS15; I guess we need to use DNX for now, then, as the only one that works in both. 2016-04-01 09:22:12 +01:00
Marc Gravell fc50aa7833 Recreate all the xproj to reflect the current tooling - old versions break VS15; enable XDocument etc in corefx (#if block was too large) 2016-04-01 09:00:33 +01:00
Marc Gravell 2a2c086009 1.50-beta8 deploy 2016-02-17 10:34:29 +00:00
Shrayas d0505aaf97 Fix small typo in contrib
default was misspelt as defualt
2016-01-29 17:54:34 +05:30