Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- kernel.Bind(x =>
- {
- x.FromThisAssembly()
- .SelectAllClasses()
- .BindDefaultInterface();
- });
- kernel.Bind(x =>
- {
- x.FromAssemblyContaining(typeof(IService))
- .SelectAllClasses()
- .BindDefaultInterface();
- });
- kernel.Bind(typeof(DbContext), typeof(SportsBetContext)).To<SportsBetContext>().InRequestScope();
- kernel.Bind(typeof(IEfRepository<>)).To(typeof(EfRepository<>));
- kernel.Bind<IUnitOfWork>().To<UnitOfWork>();
- kernel.Bind<IMapper>().ToMethod(x => Mapper.Instance).InSingletonScope();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement