Commit Graph

73 Commits

Author SHA1 Message Date
Daryl Johnston 108806565d Issue #2044 (#2045) 2024-02-17 08:03:01 +00:00
Kasper B. Graversen 7d811c4665 dapper.rainbow guide (#2043) 2024-02-17 00:16:42 +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
Marc Gravell aecffecae1 attempt NRT makeover (#1928)
* attempt NRT makeover

- annotate NRTs on GridReader API
- add protected access to some of the GridReader internals
- switch GridReader callbacks to be more type-independent

docs

lib updates; deal with yellow warnings and test failures (SQL server certs and cancellation surfacing differently)

fix break

simplify proposed GridReader changes to protected OnBeforeGrid and OnAfterGrid[Async]

Builds: Bump library versions (#1935)

Tests: Upgrade dependencies for Dependabot (#1936)

I'll do a pass at all of these later, but getting CVE versions out of the pipe.

Resolving 4 alerts here: https://github.com/DapperLib/Dapper/security/dependabot

merge and lib updates

allow Identity to be constructed on-the-fly inside GridReader

fix build warnings

include readme

rev minor

- enable [SkipLocalsInit] everywhere
- use NET5_0_OR_GREATER
 for remoting check

# Conflicts:
#	Dapper/CommandDefinition.cs
#	Dapper/DefaultTypeMap.cs
#	Dapper/SqlMapper.Async.cs
#	Dapper/SqlMapper.IDataReader.cs
#	Dapper/SqlMapper.Link.cs
#	Dapper/SqlMapper.cs
#	Directory.Build.props

* shipped, not unshipped

* fixup SqlBuilder; use is null / is not null

* use central package management (#1949)

* Nullable test tweaks

* Nuget: let's just remove it!

* 2 test fixes from review

* fix FindExplicitConstructor

* add GetPropertySetterOrThrow

* fix NRT on FindConstructor

* DapperRow: value is object?

* use NotNullWhen

* make constructor problem more obvious

* test fixes

---------

Co-authored-by: Nick Craver <nrcraver@gmail.com>
2023-09-12 15:58:49 +01: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
GitHubPang e0f04e95ec Fix typos 2021-01-09 12:38:59 +08: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
Damir Ainullin 2bc267f529 Fixes of grammar typos (#1458)
Fixes of grammar typos
2020-05-09 16:00:24 -04:00
Nick Craver c6952825e8 Update Dapper.Rainbow/Snapshotter.cs
Co-authored-by: Youssef Victor <31348972+Youssef1313@users.noreply.github.com>
2020-05-01 17:36:34 -04:00
bryancrosby 9b6c8c7d7f Fix typo in Snapshotter
Fix small typo and grammar
2020-05-01 17:36:34 -04:00
Marc Gravell 765300a32b Enable deterministic build (#1433)
* - enable deterministic build
- lib updates for core packages

* set source root if needed

* Restore VS test runner

xUnit won't run in VS without it :)

Co-authored-by: Nick Craver <craver@stackoverflow.com>
2020-04-05 13:43:31 +01:00
mgravell 7769253d59 framework and tooling lib updates; does *NOT* include the full corpus of 3rd party ADO.NET providers 2019-09-27 10:39:40 +01:00
Nick Craver 1481c4d379 Tooling and project updates (#1333)
This is a branch cleaning up old `#if` clauses, `.csproj` bits, Linux build compatibility, and a few other tid-bits (broken out by commit).

In general: we're on 3.0 tooling and all previous cruft has been removed.
2019-09-26 19:47:55 -04:00
mgravell aefb2840bb reinstate net461 TFM; fix #1325 2019-09-12 08:30:35 +01: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
Jonathan Channon a5256b7d94 Remove .NET 45 in XML docs (#1271) 2019-06-03 14:05:12 +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 7b34be3a25 net40 is dead - remove #if ASYNC bits 2017-08-21 15:25:57 -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 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
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 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 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
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 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
Rob Mackenzie 61195bf089 Snapshotter now supports private properties.
Private properties can serve as helpful passthroughs to more complex
public properties.  SqlMapper honors private properties when mapping
properties, so it seems natural for Snapshotter to follow suit on the
'get' side of things within the Dapper ecosystem.
2015-12-16 15:31:00 -05:00
Nick Craver ad0a262285 Contrib, Rainbow, EntityFramework & SqlBuilder: code cleanup 2015-11-24 20:20:52 -05:00
Nick Craver 7915f58f26 Move to Microsoft.SqlServer.Compact for Contrib tests 2015-11-22 18:03:01 -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