private void AddBllBindings()
        {
            ninjectKernel.Bind <ICategoryService>()
            .To <CategoryManager>()
            .WithConstructorArgument("categoryDal", EfCategoryDal.CreateAsSingleton());

            ninjectKernel.Bind <IAnswerService>()
            .To <AnswerManager>()
            .WithConstructorArgument("efAnswerDal", EfAnswerDal.CreateAsSingleton());

            ninjectKernel.Bind <IQuestionService>()
            .To <QuestionManager>()
            .WithConstructorArgument("efQuestionDal", EfQuestionDal.CreateAsSingleton());
        }
示例#2
0
        private static void RegisterServices(IKernel kernel)
        {
            kernel.Bind <ICategoryService>()
            .To <CategoryManager>()
            .WithConstructorArgument("categoryDal", EfCategoryDal.CreateAsSingleton());

            kernel.Bind <IAnswerService>()
            .To <AnswerManager>()
            .WithConstructorArgument("efAnswerDal", EfAnswerDal.CreateAsSingleton());

            kernel.Bind <IQuestionService>()
            .To <QuestionManager>()
            .WithConstructorArgument("efQuestionDal", EfQuestionDal.CreateAsSingleton());
        }