ninject Questions

4

Solved

this question is not new, but my problem seems to have a different root than those I have seen so far. I have a solution containing several projects: two of them are C# MVC4. I installed Ninject.M...
Iorgo asked 29/10, 2014 at 13:50

6

There are plenty of examples for having it worked on an MVC application. How is it done on Web Forms?
Seashore asked 8/2, 2011 at 13:36

3

Solved

I am doing a code review on a web site that will have a lot of simultaneous users, ca. 100,000 authenticated users. I have found the following code of type: [Inject] public BusinessLayer.ILogin...
Irrational asked 18/4, 2011 at 12:6

2

Solved

I have an ASP.NET MVC 4 Application that I want to implement Unit of Work Pattern. In my Web Project I have: IocConfig.cs using System.Web.Http; using NinjectMVC.Data; using NinjectMVC.Data.Cont...
Dentilingual asked 31/8, 2012 at 14:40

2

I'm having some issues scoping Entity Framework using Ninject within an Azure Function. I keep getting random object already disposed and internal EF errors, such as the following, which leads me...
Alum asked 24/12, 2017 at 18:26

1

In an MVC / WebAPI environment I would use InRequestScope to bind the DbContext. However, I am now on a Console application / Windows service / Azure worker role (doesn't really matter, just there...

1

Solved

Specific Question: How can I unit Test my DI configuration against my codebase to ensure that all the wiring up still works after I make some change to the automated binding detection. I've been...

4

Solved

I have couple of class libraries in my project and all are using Ninject IoC container. I wanted to load all the modules in a StandardKernel at one go wherever an INinjectModule is found. So I used...
Bootery asked 26/10, 2011 at 13:51

5

Solved

I'm trying to follow RAII pattern in my service classes, meaning that when an object is constructed, it is fully initialized. However, I'm facing difficulties with asynchronous APIs. The structure ...
Homonym asked 9/4, 2013 at 16:24

5

I am trying to use Ninject in an ASP.NET MVC 5 application that uses AutoMapper for mapping the Model to the View Model and vice versa. Unfortunately I get an error message that states that the typ...

4

Solved

If I have the following code: public class RobotNavigationService : IRobotNavigationService { public RobotNavigationService(IRobotFactory robotFactory) { //... } } public class RobotFactory : I...
Touter asked 23/4, 2012 at 18:14

1

I have found out that Ninject has recently introduced support for .NET Standard 2.0 / .NET Core 2.0. However, I cannot find any extension to actually integrate it in the Web application (e.g simil...
Begat asked 11/10, 2017 at 16:30

4

This question is not specifically related to Ninject. It's more of a general coding question, but I'm posting it here in case there might be a better way entirely of handling the issue in Ninject, ...
Ordure asked 11/3, 2013 at 12:5

4

Solved

I am trying to install Ninject 3.3.2 in .NET Core, Released in May 2016. I got an error: The dependency Ninject 3.2.2 does not support framework .NETCoreApp, Version=v1.0. Does anybody had similar...
Patriciapatrician asked 8/7, 2016 at 7:50

4

Solved

I am new to MVC, i am following "PRO ASP.NET MVC 4 by Adam Freeman". I am currently working on its 6th chapter. In which i am learning how to use Ninject in MVC 4 for Dependency Injection...
Golightly asked 28/8, 2013 at 11:4

3

Solved

public class StatisticsViewPresenter { private IStatisticsView view; private Statistics statsModel; public StatisticsViewPresenter(IStatisticsView view, Statistics statsModel) { this.view = v...

1

I have switched to ASP.NET vNext beta6 and started to receive the following exception trying to run my application: Ninject.ActivationException: Error activating IOptions{MvcJsonOptions} using bin...
Disassemble asked 8/8, 2015 at 21:29

1

Solved

I'm using Asp.net Core with AutoFac and following the accepted answer here: Validation: How to inject A Model State wrapper with Ninject? This uses ninject. I don't understand how to do the equi...
Tamera asked 18/7, 2017 at 16:6

10

Solved

Using EF5 with a generic Repository Pattern and ninject for dependency injenction and running into an issue when trying to update an entity to the database utilizing stored procs with my edmx. my...

3

Solved

It is possible to register dependencies manually: services.AddTransient<IEmailService, EmailService>(); services.AddTransient<ISmsService, SmsService>(); When there are too much depe...

3

Solved

Is it at all possible to configure Ninject to load modules that have been declared as internal? I have tried configuring InternalVisibleTo for the Ninject assembly, but this does not help. I can ...
Peroxide asked 23/6, 2011 at 13:29

2

This error appear just when I publish on Azure server: Sequence contains no elements I'm not sure this error is because of Ninject. I've tried all the tips with similar errors, but it seems that i...
Shrug asked 9/9, 2015 at 13:6

2

Solved

I have a class which needs to use an IRepository for one method in it's class. Ideally, I would like to avoid having to resolve this dependency into the class's constructor, and so I found method ...
Sora asked 3/11, 2010 at 20:13

4

Solved

I am using the ninject mvc3 plugin with my web api application. I have a binding that looks like: kernel.Bind<IFoo>().To<Foo>().InSingletonScope(); It is my interpretation that the ke...
Fed asked 8/10, 2012 at 15:8

1

Introduction I have been reading through the Ninject documentation, I reached the part where it talks about Factories (check http://www.ninject.org/wiki.html or http://www.planetgeek.ch/2011/12/31...
Crassulaceous asked 22/1, 2014 at 14:4

© 2022 - 2024 — McMap. All rights reserved.