Pregunta

I am trying to build my first Azure Application with a web role (ASP.Net web api ) and multiple worker role. I want to separate out the data access using a DI pattern for which I was thinking of using MEF, but I recently heard that its not recommended to for with MEF unless i have too much of spare time to troubleshoot the issues.

So can some one suggest me what is the other dependable options that works on Azure. I have used Unity earlier, but not sure if has any limitations on Azure platform. Basically in short, what is the most commonly used IoC these days on Azure platform. Any available sample that recommends how to use on Azure will be of great help.

¿Fue útil?

Solución

I've used Autofac and LightInject so far and they worked on Azure.

LightInject has its own package for Web API Integration: http://www.lightinject.net/#webapi

and Autofac too: https://nuget.org/packages/Autofac.WebApi

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top