Top "Unity-container" questions

The Unity Application Block (i.e. Unity) is a lightweight, extensible dependency injection container for .NET with support for interception.

Enterprise Library Unity vs Other IoC Containers

What's pros and cons of using Enterprise Library Unity vs other IoC containers (Windsor, Spring.Net, Autofac ..)?

c# .net inversion-of-control unity-container enterprise-library
Where is Microsoft.Practices.Unity package?

An hour ago I updated my nuget packages for the solution I'm working on and I get the error message, …

c# .net nuget unity-container
Ninject vs Unity for DI

We are using ASP.net MVC. Which of these is the best DI framework Ninject or Unity and why?

asp.net-mvc ninject unity-container
Unity application block 2.0 - The given assembly name or codebase was invalid

Interfaces (In the assembly named "Interfaces". In project :- Interfaces) namespace Interfaces { public interface IDoSomeWork1 { string DoSomeWork1(); } } namespace Interfaces { public …

c# unity-container enterprise-library
Proper way to Mock repository objects for unit tests using Moq and Unity

At my job we are using Moq for mocking and Unity for an IOC container. I am fairly new to …

c# .net moq unity-container
IUnityContainer.Resolve<T> throws error claiming it cannot be used with type parameters

Yesterday I've implemented the code: CustomerProductManager productsManager = container.Resolve<CustomerProductManager>(); It was compilable and working. Today (probably I've …

c# .net generics unity-container compilation
With Unity how do I inject a named dependency into a constructor?

I have the IRespository registered twice (with names) in the following code: // Setup the Client Repository IOC.Container.RegisterType<…

c# inversion-of-control unity-container
How to registerType with a PARAMETER constructor?

How do I registertype with the container where the type doesn't have NO PARAMETER constructor. In fact my constructor accepts …

dependency-injection unity-container ioc-container
Constructor Injection in C#/Unity?

I'm using C# with Microsoft's Unity framework. I'm not quite sure how to solve this problem. It probably has something …

c# dependency-injection unity-container constructor-injection
Base controller constructor injection in ASP.NET MVC with Unity

I have a base controller in my MVC 5 project which implements some shared functionality. This functionality requires some dependencies. I …

c# asp.net-mvc dependency-injection inversion-of-control unity-container