Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Ninject.Modules;
- using Ninject.Web.Common;
- using SlateCore.DAL.Interfaces;
- using SlateCore.DAL.Repositories;
- namespace SlateCore.BLL.Util
- {
- /// <summary>
- /// The class for introduction of dependencies
- /// </summary>
- public class ServiceModule : NinjectModule
- {
- private string connectionString;
- public ServiceModule(string connection)
- {
- connectionString = connection;
- }
- /// <summary>
- /// The method establishes dependecies.
- /// The UnitOfWork use as the object IUnitOfWork
- /// </summary>
- public override void Load()
- {
- //Bind<IUnitOfWork>().To<UnitOfWork>().WithConstructorArgument(connectionString);
- Bind<IUnitOfWork>().To<UnitOfWork>().InRequestScope().WithConstructorArgument(connectionString);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement