Learn Dapper: https://www.learndapper.com/
Dapper Tutorial: https://dappertutorial.net/
Info
Version: | 0.5.9 |
Author(s): | Rik Svendsen Rose |
Last Update: | Wednesday, March 28, 2018 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | https://github.com/generik0/Smooth.IoC.Dapper.Repository.UnitOfWork |
NuGet Url: | https://www.nuget.org/packages/Smooth.IoC.Dapper.Repository.UnitOfWork |
Install
Install-Package Smooth.IoC.Dapper.Repository.UnitOfWork
dotnet add package Smooth.IoC.Dapper.Repository.UnitOfWork
paket add Smooth.IoC.Dapper.Repository.UnitOfWork
Smooth.IoC.Dapper.Repository.UnitOfWork Download (Unzip the "nupkg" after downloading)
Dependencies
.NETStandard 1.6
- NETStandard.Library(>= 1.6.1)
- System.ComponentModel.Annotations(>= 4.3.0)
- Dapper(>= 1.50.4)
- Dapper.FastCrud(>= 2.4.1)
- System.Data.Common(>= 4.3.0)
- Smooth.IoC.UnitOfWork(>= 0.5.8)
- Dapper(>= 1.50.4)
- Dapper.FastCrud(>= 2.4.1)
- System.Data.Common(>= 4.3.0)
- Smooth.IoC.UnitOfWork(>= 0.5.8)
- Dapper(>= 1.50.4)
- Dapper.FastCrud(>= 2.4.1)
- System.Data.Common(>= 4.3.0)
- Smooth.IoC.UnitOfWork(>= 0.5.8)
- Dapper(>= 1.50.4)
- Dapper.FastCrud(>= 2.4.1)
- System.Data.Common(>= 4.3.0)
- Smooth.IoC.UnitOfWork(>= 0.5.8)
- Dapper(>= 1.50.4)
- Dapper.FastCrud(>= 2.4.1)
- System.Data.Common(>= 4.3.0)
- Smooth.IoC.UnitOfWork(>= 0.5.8)
Tags
On the project site there are examples of Autofact, Castle.Windsor, Ninject, Simpleinjector, StructureMap, and Unity integration.
The IoC framework is not an issue..It is ment to integrate nice and smooth like...
The project uses tor its repository work Dapper as ORM and Dapper.FactCRUD for fluentness. But you can use is as a foundation and with any IDbConnection and IDbTransient framework you like.
The library gives you the building blocks to:
* Create Sessions from the IDbFactory in your methods, IDbFactory should be injected into your class's. As Session extends IDbConnection and will Open on the factory spawning the session and dispose the connection on disposal of the connection.
* Your Sessions can create UnitOfWork's.
As Session extends IDbConnection and will Open on the factory spawning the session and dispose the connection on disposal of the connection.
* If your logic just needs "just a" UnitOfWork with a session that has the same scope, the factory can create it for you.
* The IRepository and abstract concrete class should be used on your individual repository classes to provide simple and basic calls. But ofcasue you can add all the queries you want into your Repositories and use the dapper and dapper.FastCRUD (or any other extensions) functionality provided to you.
* The repository abstract classes use Dapper.FastCRUD to give you a fluent ORM experience with the most common calls.
* This library does not lock you to using dapper and FastCRUD, you can use any library you like that extends IDbConnection and IDbTransation, and still use the IDbFactory, ISession and IUnitOrWork.
* Implemented for .net 4..0, .net 4.5.2, .net 4.6.1, .net 4.7.1+, .net 1.6 standard, .net 2.0 standard+.