Info
| Version: | 1.0.1 | 
| Author(s): | MoonStorm | 
| Last Update: | Saturday, October 17, 2015 | 
| .NET Fiddle: | Create the first Fiddle | 
| Project Url: | https://github.com/MoonStorm/Ninject.Extensions.UnitOfWork | 
| NuGet Url: | https://www.nuget.org/packages/Ninject.Extensions.UnitOfWork | 
Install
Install-Package Ninject.Extensions.UnitOfWork
                        dotnet add package Ninject.Extensions.UnitOfWork
                        paket add Ninject.Extensions.UnitOfWork
                        
                                Ninject.Extensions.UnitOfWork Download (Unzip the "nupkg" after downloading)
                            
                        Dependencies
- Ninject(3.2.0)
Tags
 
                
You could look at this as being the equivalent of InRequestScope from web environments in console applications and services.
The unit-of-work scopes are kept consistent across async calls and tasks.
Setup:
_kernel.Bind<IService>().To<Service>().InUnitOfWorkScope();
Usage:
using(UnitOfWorkScope.Create()){
// resolves, async/await, manual TPL ops, etc
}.