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()); }
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()); }