InternetException

Ninject

Ninject · 3 posts (all tags)

Ninject and WCF

· 817 words · ~4 min read · updated · in .NET, ASP.NET

#Ninject #WCF #API design

Ninject is very simple and in the same time powerful IoC container. I used it in few project and had very little or none problems. Most of the time getting instances from Ninject kernel requires simple line with binding expression, or even this is sometime unnecessary if type is self bind able (i.e. if it is concrete class with parameterless constructor). Little harder is getting Ninject to work with WCF. You cannot just bind interfaces types because proxies which implements them are created through .NET mechanism. Luckily WCF system is very flexible and mostly can be changed/extended with custom functionality.

Read the whole thing →

Ninject and Entity Framework

· 730 words · ~3 min read · updated · in .NET, C#, Entity Framework

#Ninject

Last time I wrote about problem with testing Entity Framework in Visual Studio 2012. During working on this project I also encounter problems with configuration of Ninject to allow injecting Entity Framework classes from its Patterns extension. To be frankly this was not much a problem then lack of documentation. I just was forced to experiment with Ninject and new-thing-for-me Entity Framework Patterns extension.

Read the whole thing →

Entity Framework Patterns extension and Unit Test in Visual Studio 2012

· 646 words · ~3 min read · updated · in Entity Framework, Visual Studio

#Unit tests #reflection #NuGet #Ninject

Yesterday I was trying to make work simple test class in VS2012. I did not know what was wrong exactly. It was first project when I tried to glue together Entity Framework with repository pattern and Ninject as IoC container. Because of the fact that this was first time for solution like that I was sure that it is me, or rather source of my problem was indeed my code. But let’s not skip ahead.

Read the whole thing →