Blog: Web

How to implement and register a custom dependency resolver in ASP.NET MVC 5

March 6, 2015, (updated on March 26, 2015), Software Development

The ASP.NET MVC 5 framework supports the integration of 3rd party dependency injection frameworks. This can be done by implementing the IDependencyResolver interface and registering an instance of the interface on application startup. The registration is made in the Application_Start method which can be found in the Global.asax.cs file: protected void Application_Start() { ... var compositionContext = new CompositionContext(); compositionContext.AddPart<IMyService, MyServiceImpl>(); // TODO: Register your own services here DependencyResolver.SetResolver(new MyDependencyResolver(compositionContext)); } Most dependency injection frameworks provide a NuGet package which already contains an IDependencyResolver implementation (for example Ninject.MVC3). However, because I wanted to use the IoC container from my own […] Read more...

Tags: , , , , , , ,

Taking fear from the .NET/XAML guy: Implement single-page web applications with TypeScript and MVVM

November 24, 2014, Software Development

I recently had to implement a JavaScript single-page web application – after years of doing .NET and XAML development. From projects which I worked on some years in the past, my opinion about JavaScript was not very good: There was no good IDE support, refactorings are hard to perform and the code in bigger project always gets unmanageable due to the untyped nature of JavaScript… Continue reading at my company’s blog… Read more...

Tags: , , , ,


  Page 1 of 1