Dependency injection in views..

Jan 26, 2012 at 12:16 AM

I have been looking online how to use DI in razor views and I found you need to do something like below and inherit from this class. The thing is all the examples have an Attribute on top of the get;set; property below like [Inject]. [Dependency] ,etc. What do you use for Munq?? Does it support View dependency injection like Unity, and Ninject do??

public abstract class InjectedView<TModel> : WebViewPage<TModel>

        public IUserRepository InjectedInterfaceInstance { get; set; }

Mar 1, 2012 at 3:55 PM

No at the moment.  I'll look into it.