77 Commits
Author SHA1 Message Date
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 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
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
Nick Craver 8e070ddca5 Interfaces are back, simplifying code.
Related issue: #520
2016-05-23 20:43:30 -04:00
Shrayas d0505aaf97 Fix small typo in contrib
default was misspelt as defualt
2016-01-29 17:54:34 +05:30
joncloud a967b0c2fa Added checks to make sure that arrays get the appropriate type when delete/insert/update is called. 2015-12-25 10:49:45 -08:00
Johan Danforth 5c5eae8e8f Fix and test for issue #418 2015-12-06 11:37:12 +01:00
Nick Craver eb51910ca6 Merging #370 2015-11-26 15:50:14 -05:00
Nick Craver 63706bb877 Merge branch 'pr/368' 2015-11-26 15:27:12 -05:00
Nick Craver 336cacbe05 Contrib: fix #404 changes and other issues in MySQL
This fixes some MySQL issues - test suite that confirms issues and fixes
is incoming. TODO shortly after: implement the Insert<T, TKey> style
methods. I just want to get tests running (and some added) first.
2015-11-25 06:04:07 -05:00
Nick Craver b9c5d5d8d5 Contrib: DRY code current keys implementation 2015-11-24 21:45:12 -05:00
Nick Craver ad0a262285 Contrib, Rainbow, EntityFramework & SqlBuilder: code cleanup 2015-11-24 20:20:52 -05:00
Nick Craver bc8468f494 Merge pull request #410 from joncloud/issue#404
Provided a name for MySql LAST_INSERT_ID call to allow the result to …
2015-11-24 19:21:25 -05:00
joncloud 9bd979845d Provided a name for MySql LAST_INSERT_ID call to allow the result to map correclty. 2015-11-24 14:39:55 -08:00
Nick Craver fd10fe7ccb A full CoreCLR/DNX friendly conversion
This eliminates the dual solutions and brings Contrib into the
project.json fold.
- Tests are ported to xUnit though SQLite is disabled on DNX due to
Issue #375 (Interop loads fail in the VS runner and  params are busted
regardless).
- Projects are consolidated down to what's currently possible with
project.json.
- Contrib moved to: Dapper.Contrib and Dapper.Tests.Contrib (so tests
appear at the end, no other reason vs. Dapper.Contrib.Tests)
- EF moved to: Dapper.EntityFramework(.StrongName)
- Rainbow moved to: Dapper.Rainbow
- SqlBuilder moved to: Dapper.SqlBuilder
- Packages are removed since it's not current-tooling friendly to keep
them (nor was it using them).
- xUnit implemented in Contrib via abstracts - this allow us to very
quickly add any database provider to the rig in a very concise way.
- Contrib unit tests fixed in various places - they were not
parallel-runner friendly
- Nuspecs removed, since they aren't used anymore (to eliminate
confusion)
- Removed speed tests for libraries that aren't on current versions of
.Net (what would we be comparing?)
- Perf tests moved to Dapper.Tests (consolidation from
Dapper.DNX.Tests), but aren't activated yet (no define)
2015-11-22 17:56:33 -05:00
JanZakrzewski e447523d65 fixed GetAll when used with ExplicitKey 2015-10-28 12:01:57 +01:00
johandanforth 61998c4fa2 bug in keypropertiescache 2015-10-27 15:13:05 +01:00
johandanforth 4012fbfef5 Fix for issue #361 2015-10-27 14:25:10 +01:00
Nick Craver 8662754801 Code readability: property naming
TODO: Centralize the adapter repeated code down to an abstract class
2015-10-15 06:42:50 -07:00
johandanforth 3ad263d242 Fixes for #336 escape column names 2015-10-14 14:16:23 +02:00
johandanforth 2f7125a0ec Fixes for issue #351 2015-10-13 22:42:16 +02:00
ithero7 bbf93cb260 Little changes :)
Correct the spelling mistake, and change the variable name to satisfy the naming conventions.
2015-09-06 23:46:14 +08:00
johandanforth 984055aabf Specific insert adapters for sql/sql ce. Faster inserts for sql server now 2015-06-20 13:36:08 +02:00
Tor c625042594 Brackets around property names in Update & Delete
Modified Update & Delete method to be consistent with Insert by adding brackets around property names
2015-06-09 15:12:32 +02:00
johandanforth c8ca11efb4 Contrib Insert support for short/int16 id/key Issue #196 2015-06-07 20:56:22 +02:00
johandanforth e408faba82 Contrib Insert now handles closed connection 2015-06-07 13:54:35 +02:00
johandanforth 62cb035dbc Custom table name mapper for Contrib 2015-06-06 19:30:03 +02:00
johandanforth beb675d1dc GetDatebaseType delegate for Contrib Insert 2015-06-06 18:01:40 +02:00
johandanforth 63460c60e9 specify sqladapter for insert() and insertasync() 2015-05-27 00:01:17 +02:00
Johan Danforth d6e068d348 Added InsertAsync to Dapper.Contrib and small fix to GetAllAsync 2015-05-12 20:21:01 +02:00
Johan Danforth c4905c5750 New features in Dapper.Contrib 2015-05-12 18:18:10 +02:00
johandanforth a67ed727e6 Cleaned up shared files in Contrib and tests. Also added tests for transactions in Contrib 2015-05-01 22:52:13 +02:00
johandanforth c8bd264d01 Revert "spring cleaning in Contrib areas, more share of code between framework versions in Contrib"
This reverts commit 27abc447e1.
2015-05-01 22:19:36 +02:00
johan_danforth@hotmail.com 27abc447e1 spring cleaning in Contrib areas, more share of code between framework versions in Contrib 2015-04-23 22:29:15 +02:00
Marc Gravell ad5afe13f9 fix comment to avoid anyone doing anything silly with IDENT_CURRENT 2015-04-13 07:53:32 +01:00
Marc Gravell 71bac1da42 Created NET45 dapper.contrib in anticipation of pull request 2014-08-05 16:26:50 +01:00
Marc Gravell 7af019ea88 via geovar (https://github.com/StackExchange/dapper-dot-net/issues/133) 2014-08-05 16:14:07 +01:00
Marc Gravell d68ec20e5a Merge pull request #94 from mjul/master
Added DeleteAll method to easily delete all entities in a table
2014-05-07 14:48:52 +01:00
Marc Gravell aec9a9d24f Merge pull request #109 from majorsilence/sqlite-support
Add SQLiteAdapter
2014-05-07 13:46:23 +01:00
Peter Gill 48c111acf9 Add SQLiteAdapter. Dapper.Contrib inserts now works with sqlite. 2013-12-20 19:59:01 -03:30
Benjamin Collins 67026a0dd7 add ComputedAttribute to allow support for computed columns on Insert 2013-12-07 23:41:42 -06:00
Martin Jul 5d7d2318da Added DeleteAll method to easily delete all entities in a table 2013-08-27 13:22:57 +02:00
danzel 0f3cec9440 Fix broken properties cache. 2013-08-21 13:34:01 +12:00
Rick Bundren 7fd9b97355 Support for reserved words as columns
Insert failed when a word such as order was used as a column name.
Added [] around the column name.

Also modified the test for InsertGetUpdate().  The first Get is now a
User instead of IUser.  There is some bug where using the interface
twice first on a null result and then on the real result causes the
reader to not be open when trying to map the type.
2012-11-15 11:20:12 -05:00
danzel fad9e60598 Throw an exception when asked to Delete<MyType>(null) rather than trying to as in Npgsql it will delete the whole table. 2012-03-23 11:49:52 +13:00