Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

dependency-injection

Configuring dependency injection with ASP.NET Web API 2.1

September 1, 2022 by Magenaut

I’m creating an ASP.NET Web API 2.1 site and as I want to inject dependencies directly into the controllers, I’ve created my own implementation of IDependencyResolver so that StructureMap will handle that for me.

Categories ASP.NET, Q&A Tags asp.net, asp.net-web-api, dependency-injection, structuremap Leave a comment

Dependency Injection with Custom Membership Provider

September 1, 2022 by Magenaut

I have an ASP.NET MVC web application that implements a custom membership provider. The custom membership provider takes a UserRepository to its constructor that provides an interface between the membership provider and NHibernate. The UserRepository is provided by the Ninject IoC container.

Categories ASP.NET, Q&A Tags asp.net, asp.net-mvc, dependency-injection, ninject, ninject-2 Leave a comment

Configuring Ninject with Asp.Net MVC & Web Api

August 31, 2022 by Magenaut

i have setup my project with Ninject IoC.
My project has regular Asp.Net MVC controllers and Web Api controllers. Now, Ninject works with Web Api but Ninject doesn’t work with regular Asp.MVC controllers.

My regular MVC controller implementation;

Categories ASP.NET, Q&A Tags asp.net, asp.net-mvc, dependency-injection, ninject, repository-pattern Leave a comment

How to free resources and dispose injected service in ASP.NET 5/Core by the end of request?

August 31, 2022 by Magenaut

I have a service which is injected into a controller using the ASP.NET Core’s default Dependency Injection Container:

Categories ASP.NET, Q&A Tags asp.net, asp.net-core, asp.net-mvc, c#, dependency-injection Leave a comment

Autofac in web applications, where should I store the container for easy access?

August 30, 2022 by Magenaut

I’m still pretty new to using Autofac and one thing I miss in the documentation and examples is how to make it easy to get to the configured container from different places in a web application.

Categories ASP.NET, Q&A Tags asp.net, autofac, dependency-injection, inversion-of-control Leave a comment

ASP.NET MVC3 + ActionFilterAttribute + Injection?

August 30, 2022 by Magenaut

Hey there, I’ve succesfull been able to use property injection in my FilterAttribute, however I’m wondering whether its possible to move it into the constructor instead?

Categories ASP.NET, Q&A Tags actionfilterattribute, asp.net, asp.net-mvc-3, c#, dependency-injection Leave a comment

‘Autofac Circular Component Dependency Detected’ Error

August 30, 2022 by Magenaut

I am new to IoC and am using Autofac in my current project.

Categories ASP.NET, Q&A Tags asp.net, autofac, dependency-injection, inversion-of-control, ioc-container Leave a comment

possible GetObjectsOfType replacement

August 30, 2022 by Magenaut

I have this small piece of code

Categories ASP.NET, Q&A Tags asp.net, c#, dependency-injection, ioc-container, spring.net Leave a comment

Options for wiring dependencies with NInject

August 30, 2022 by Magenaut

With NInject (preferably 2.0), what options do we have wrt wiring up our object dependencies in a web application?

Categories ASP.NET, Q&A Tags asp.net, asp.net-mvc, configuration-files, dependency-injection, ninject Leave a comment

Why does everyone say dependency injection in ASP.NET webforms is hard when PageHandlerFactory and IHttpHandlerFactory exist?

August 29, 2022 by Magenaut

So I have a legacy webforms site and am working on making it easier to maintain. Chucking it away and rewriting it isn’t an option.

Categories ASP.NET, Q&A Tags asp.net, dependency-injection, inversion-of-control, webforms Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress