1274 Commits

Author SHA1 Message Date
Nick Craver 4b746010ea bump semver for next release 1.50.4 2017-11-25 20:43:39 -05: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
ydango dc374ad105 Shortened the changes
Combined 2 tests into one
2017-11-05 20:07:13 -05:00
ydango 5b52424ca9 Tests for DateTime2 compatibility
This shows the importance of using DbType.DateTime2 in Dynamic Parameters to avoid precision truncation
2017-11-05 20:07:13 -05:00
Marc Gravell 9c8e27779a words are hard 2017-11-01 09:22:36 +00:00
Marc Gravell dc725a3f33 Additional notes on literal replacements 2017-11-01 09:21:13 +00:00
Marc Gravell 853201c463 Merge pull request #873 from yvesmh/master
Add literal replacement example to readme
2017-11-01 09:12:39 +00:00
Yves Mancera b343f72451 Add literal replacement example to readme 2017-10-31 14:19:44 -07:00
Nick Craver 931c700dc2 MyGet feed!
Adding a dapper specific feed, for much easier pushing to NuGet. When
they implement Ctrl+Click in the UI this won't be necessary...or we
break down and automate it finally. Depends on signing plans later.
2017-09-14 13:58:42 -04:00
Nick Craver d45b79ff9d Fix build script
Removes NuGet workaround for pre-2.0 and lines up with other script
enhancements since.
2017-09-14 10:42:08 -04:00
Nick Craver e2ebdb08ac Dapper.Contrib: netstandard2.0 2017-09-14 10:37:18 -04:00
Nick Craver c747c63283 Lib updates and prep for netstandard2.0 alpha 2017-09-14 10:04:29 -04:00
Nick Craver 98c94c561c Misc build analyzer fixups 2017-09-14 10:02:00 -04:00
Nick Craver 071a3fd5a0 .editorconfig and formatting 2017-08-21 16:25:48 -04:00
Nick Craver 9e67f97f0c Merge branch 'master' of https://github.com/StackExchange/Dapper 2017-08-21 16:00:50 -04:00
Nick Craver 967a4a0a32 Merge pull request #827 from verysimplenick/master
Micro optimizations for CreateParamInfoGenerator
2017-08-21 16:00:46 -04:00
Nick Craver 7b34be3a25 net40 is dead - remove #if ASYNC bits 2017-08-21 15:25:57 -04:00
Nick Craver 702c918b33 Merge branch 'master' into master 2017-08-21 09:21:30 -04:00
Nick Craver 6ce36492ea Update README for new assertions 2017-08-21 08:29:53 -04:00
Nick Craver 4e99985dcc Fix unit tests 2017-08-21 08:25:02 -04:00
Nick Craver 8bc2f8c1c4 Merge pull request #782 from jiabiao/master
AddDynamicParameters repeated should work  while paramtype is DbString
2017-08-21 08:17:47 -04:00
Nick Craver 1f1e277db6 Merge pull request #837 from StackExchange/netstandard2-cleanup
Netstandard2.0 Followup Cleanup
2017-08-21 06:46:17 -04:00
Nick Craver 9076086b31 Merge pull request #836 from StackExchange/netstandard2
.NET Standard 2.0, for great justice.
2017-08-21 06:44:01 -04:00
Nick Craver ff2c70d0ec Cleanup 2017-08-20 23:00:16 -04:00
Nick Craver bdebedea41 Tests: xUnit cleanup
This change:
- Removes the Assert shim
- Uses recommended xUnit methods (improving fail errors)
- Cleans up exception tests
- General test formatting fixes
- Removes the netcoerapp1.0 only testing (oops commit)
2017-08-20 23:00:08 -04:00
Nick Craver e645420c7b Update README to remove advetisements 2017-08-20 17:57:33 -04:00
Nick Craver 71b179af9a Fix for #815
New overload so this isn't a breaking change. We can collapse down in v2.0 (including the Impl method).
2017-08-20 17:03:40 -04:00
Nick Craver 1bd1b4f8f5 Fix for #808
Add dynamic overloads for:
- QueryFirstAsync
- QueryFirstOrDefaultAsync
- QuerySingleAsync
- QuerySingleOrDefaultAsync

This may change a lot in 2.x, but many people asking for them now so here they are. Unit tests also fixed for QuerySingleOrDefaultAsync.

Note: this builds on the netstandard2 branch because of the xUnit changes to go with VS 2017 15.3.
2017-08-20 16:50:56 -04:00
Nick Craver 9d9afeaf29 Update semver, add to solution 2017-08-20 16:00:46 -04:00
Nick Craver 01c6a13967 Merge remote-tracking branch 'origin/master' into netstandard2 2017-08-20 15:46:39 -04:00
Nick Craver 6904fa4ed5 Appveypr: update to base 2017 image again
.NET Core 2 SDK is on the base Appveyor image now
2017-08-20 15:18:09 -04:00
Nick Craver 76c2e186e2 More test fixes 2017-08-20 15:17:33 -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
Nick Craver ac7b9f5a6f Merge branch 'netstandard2' of https://github.com/StackExchange/Dapper into netstandard2 2017-08-15 12:58:07 -04:00
Sergii Volchkov a9560b3193 Enable SqlDataRecord TVPs on netstandard1.3. (#802)
* Enable SqlDataRecord TVPs on netstandard1.3.
* Update netstandard2.0 SqlClient references to Preview 2.
* Skip TransactionScope tests for netcoreapp2.0.
- According to https://github.com/dotnet/corefx/issues/12534, ambient transaction enlistment is not included with .net core 2.0.
* Update references in Dapper.StrongName.
* Disable parallel test run to stabilize flaky type handler tests.
* Disable parallel test run by assembly attribute.
* Move Issue461 tests to TypeHandlerTests.
* Group type handler tests in a collection, re-enable parallelization.
- Being part of the same collection, type handler tests will run sequentially. All other tests can run in parallel.
* Move tests relying on query cache & type maps to a separate collection.
2017-08-15 12:56:33 -04:00
verysimplenick e1fdc3bdd1 Avoid allocation for linq in CreateParamInfoGenerator and added some other micro optimizations 2017-08-09 02:15:03 +03:00
Nick Craver 910246bf24 Appveyor: use the VS 2017 preview image 2017-06-15 06:11:05 -04:00
Nick Craver 610d8f65bc Revert "Enable SqlDataRecord TVPs on corefx. (#801)" (#803)
This reverts commit e7ad0874de.
2017-06-15 06:08:18 -04:00
Sergii Volchkov e7ad0874de Enable SqlDataRecord TVPs on corefx. (#801) 2017-06-15 06:06:25 -04:00
Ffloriel 0151dea8fc Markdown tables (#800)
Markdown tables instead of html
“Can be faster” in correct row
2017-06-13 21:10:10 -04:00
Nick Craver ee0b246f34 Perf: add EntityFramework Core to legacy tests 2017-06-02 11:37:05 -04:00
James Law 3c14c8b660 Added EntityFrameworkCore performance tests (#778) 2017-06-02 11:24:39 -04:00
Bill.B.Jia 02644d7791 fix issue #731: AddDynamicParameters repeated if paramtype is DbStiring should work. 2017-05-20 02:48:39 -07:00
Nick Craver fb443385ad Try and use BenchmarkDotNet correctly
OperationsPerInvoke is an informational, not instructional property.
What we actually want is the UnrollFactor. Moved into the job definition
to simplify things.
2017-05-14 13:31: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
Kevin Jones bc9644a737 Minor README tweaks. (#776)
Use an HTTPS link where possible.
Fix 404 for performance tests.
2017-05-13 21:46:52 -04:00
Nick Craver ba641f1890 Merge MySQL fixes in 2017-05-13 07:35:54 -04:00
Nick Craver ea6b193406 Benchmarks: performance and formatting 2017-05-12 21:14:02 -04:00
Bradley Grainger a46354a2e2 Fix MySQL tests and disposal (#774)
* Don't create the connection in Dispose: this avoids creating a SQLConnection simply to Dispose it.
* Run MySQL tests against the open MySqlConnection: 'connection' is a protected variable in the TestBase class that is a SQL Server connection, not a MySQL connection.
* Skip broken MySQL tests: as per issue #295, setting "AllowZeroDateTime=True" in the connection string causes an InvalidCastException in SqlMapper.
2017-05-12 18:18:34 -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