40 Commits

Author SHA1 Message Date
Daryl Johnston 108806565d Issue #2044 (#2045) 2024-02-17 08:03:01 +00:00
Kasper B. Graversen 4f8e92fba5 Exposing the transaction used in class Database. (#2038)
This enables to do queries not supported by rainbow within the same transaction

Closes #1944
2024-02-15 07:30:52 +00:00
Nick Craver 1f8e09e0f6 Whitespace cleanup 2021-05-09 09:37:13 -04:00
Nick Craver 62b3c91662 Merge remote-tracking branch 'origin/main' into pr/1254 2021-05-09 09:36:21 -04:00
Marc Gravell 6ab170c160 .Net 5 (#1572)
* initial net5.0 tweaks; also fix current IDE warnings

* lib updates and fixes

* more cleanup

* fix snafu

* skip locals init

* disable xunit shadow copy in tests

* test records

* explore scenario that currently works re #1571
2020-11-17 09:57:17 +00:00
Damir Ainullin 4fb1ea29d4 Replace empty array with Array.Empty<T>, add compound assignment, fix of grammar typo (#1459)
Misc cleanup
2020-05-10 06:52:06 -04:00
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
Dmytro Gokun 6df95cbdbd Expose the underlying connection from Rainbow Database so it's easier to use Dapper alongside other DB frameworks (#1257) 2019-08-27 17:33:14 +01:00
Dmytro Gokun 012e9b6f08 Add ability to override Dispose() in the derived class (#1256) 2019-08-27 17:32:51 +01:00
Dmytro Gokun dac717d3ae Fix Rainbow Database.Dispose() so that it never throws and not overrides the active exception (if any) 2019-05-06 13:58:17 +03:00
Nick Craver 071a3fd5a0 .editorconfig and formatting 2017-08-21 16:25:48 -04:00
Nick Craver b5b65e6070 Documentation: Rainbow 2017-05-08 14:47:05 -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 8e070ddca5 Interfaces are back, simplifying code.
Related issue: #520
2016-05-23 20:43:30 -04:00
Nick Craver ad0a262285 Contrib, Rainbow, EntityFramework & SqlBuilder: code cleanup 2015-11-24 20:20:52 -05: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
Nick Craver dfe90c40c4 Dapper.Rainbow CreateTableConstructor: Prevent compiler breaks 2015-10-15 08:50:33 -07:00
Martin Devillers 1e8011ce91 FIX: Properties of type Table<T, TId> are not initialized
Table properties that implement Table<T,TId> instead of Table<T> are not recognized during the initialization of the Database<T> class. As a result, these properties remain uninitialized after the call to Database<T>.Init().

// Works fine
public Table<Person> Persons { get; set; }

// Remains 'null' after Init
public Table<Car, Guid> Cars { get; set; }
2015-10-15 08:50:32 -07:00
Nigrimmist b2754e8e46 - pr fixes 2015-10-02 11:42:15 +03:00
Nigrimmist 7e8eab6a5d - code improvements 2015-10-02 01:39:13 +03:00
Marc Gravell 7262a51ef7 Revert "Escape column names" 2014-09-15 20:30:46 +01:00
Marc Gravell 4153d2d895 Merge pull request #162 from jbattermann/master
Added async/await to Dapper.Rainbow - .Net 4.5 Hooray \o/
2014-09-15 14:15:41 +01:00
João Pedro Marques 2fab0edd01 Escape column names 2014-09-15 00:39:02 +04:00
Jörg B. 40a91918a7 Added async/await to Dapper.Rainbow. .Net 4.5 Hooray \o/
I kept my hands off Sam's original Code as much as possible, only made
the two major classes partial and added the .Net 4.5 Async other half in
the new project (basically what Dapper NET45 does to Dapper).
2014-09-08 00:48:23 +02:00
von edde1eb616 Support for "ignoring property" 2013-04-01 11:34:56 +08:00
Sam 6950c694b3 Merge pull request #66 from rayjezek/master
Rainbow: Ignore Id property when calling Table.Insert
2012-12-05 17:06:16 -08:00
Sam b3dc7d180d Merge pull request #68 from tms/rainbow-extensibility
Updated Table methods to better support multi-DB
2012-12-05 17:05:17 -08:00
Ray Jezek 4fff0866c4 Removed Id parameter when calling Table.Insert
"Id" is being removed most places in Rainbow, but not on Table.Insert. I
changed this to make it consistent with SqlCompactTable.Insert and
Table.Update.
2012-12-04 15:08:11 -06:00
Sebastian Burgstaller 963b6e711c Added database schema support to Dapper.Rainbow 2012-11-23 12:09:04 +01:00
tms 73d0ba34cf Updated Table methods to better support multi-DB
No sense in escaping TableName only for update, "from" isn't universally
optional for deletes, First() should be virtual to allow alternatives to
TOP 1
2012-11-11 15:59:43 -05:00
Roman Gomolko d0423de69d Added support of different ID column types to Dapper.Rainbow
From time to time ID column has types different to int. With this change
you could specify column type if it is different to int. Example:
public Table<MyDb, Guid> Users { get; set; }
2012-09-07 11:17:00 +03:00
Marc Gravell 4a7e7fb5da Merge branch 'master' of https://github.com/jedidja/dapper-dot-net into jedidja-master
Conflicts:
	Dapper.Rainbow/Database.cs
2012-08-07 12:13:20 +01:00
Garrett Wolf 7a454ad48e Capitalized "id" to maintain consistency 2012-07-14 17:15:23 -07:00
jedidja 7919913cba Merge branch 'master' of github.com:jedidja/dapper-dot-net
Conflicts:
	Dapper.Rainbow/Database.cs
2012-03-23 09:01:31 -04:00
jedidja b67d6850f5 Derived SqlCompactDatabase from Database
Changed CreateTableConstructor to work for child table type
2012-03-23 08:56:47 -04:00
jedidja fd8f3f1df5 Added INSERT for SQL Compact 2012-03-20 11:40:44 -04:00
Sam Saffron 28c33d454f Dapper rainbow is now on nuget 2012-01-12 17:05:11 +11:00
Sam Saffron c9160c13fb Upped dapper to 1.8
Broke SqlBuilder to another assembly
Added Dapper.Rainbow (minimal ORM)
Changed nuget to distribute DLLs
2012-01-12 15:22:01 +11:00