Questions tagged [simple-injector]

Simple Injector is an Dependency Injection library for Microsoft .NET, .NET Core, .NET Standard, Windows Phone, Windows Store Apps, and Mono.

Simple Injector is an Inversion of Control library for the Microsoft .NET platform and supports .NET 4.0, .NET Core, .NET Standard, Silverlight, Windows Phone 8, Windows Store Apps, PCL and Mono. According to the web site, the goal of Simple Injector is to provide .NET application developers with

an easy, flexible and fast dependency injection library that uses best practice to guide your solutions toward the pit of success.

To get familiar with Simple Injector, you can go to the project's documentation wiki. It contains many subjects, such as:

References:

The Advanced scenarios section of the documentation talks about subjects such as:

Besides these references to the Simple Injector documentation there are lots of other interesting articles such as:

1070 questions
-1
votes
2 answers

Register 2 implementations of the same class

Having 2 classes implementing the same interface, how to register them? The first registration works well: iocContainer.Register(Lifestyle.Transient); But if I register the second class with the same interface, it throws an…
-1
votes
2 answers

Web app instancing performance hit with dependency injection

I have a asp.net mvc app where a lot of things are dependent on knowing the url of the web request (it's multi-tenant). Currently the HttpContext is being injected in a lot of constructors (through a wrapper that sets up some variables based on the…
-1
votes
1 answer

Proper SimpleInjector configuration for WebApi and UnitOfWork Pattern

I have read through the SimpleInjector documentation a few times. But have a few questions. Context: 3 tier app (presentation (mvc + api controllers), service (business logic), data (repositories, entities, etc) Unit of Work is a thin wrapper…
-1
votes
1 answer

IoC Web Forms - How to load interface implementation from one of two assemblies depending on value of certain variable?

I have two assemblies which implement the same interfaces (two different implementations for the same interface). When user logs into web forms application certain variable (flag) is being set to specific value. This variable should be used for…
zux
  • 23
  • 2
-2
votes
1 answer

How to use DI in WPF to having a new istance without ask to container

i'm trying to develop from scratch a WPF app with the use of Simpleinjector as a IOC container. I'm new on this topic and i have some issue regards lifetime of object and hot use them correctly. I started the app by following the WPF integration…
1 2 3
71
72