-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use Unity instead of Ninject as IoC? #35
Comments
Hi Rotte2: I haven't used Unity, but I'm wondering if it would be as easy as: for all the types above, and in combination with http://www.nuget.org/packages/Unity.Mvc4. Sorry I can't provide more detailed help, I'll have to try Unity myself one day. |
Hi OdeToCode A colleague helped me out on this - the final code looks like this (using Unity): container.RegisterType<IApplicationEnvironment, AspnetEnvironment>(new HierarchicalLifetimeManager()) Just in case anyone has the same problem. Another question: I want to add more properties to the User entity (like first and last name) - how do I get retrieve the persisted User entity, f.ex. in the Manage method in the Controller class? Thanks |
Do you have a DbContext derived class setup? You can use that class or go through the DbContext or through FlexUserStore derived class. Let me know if that makes sense. |
Hi again I have a RavenDB setup, and now it's working using the AccountController Thx 2013/9/14 K. Scott Allen [email protected]
|
Well, there is a fairly broad range of scenarios there. For example, do you expect users to login to the site before script starts calling WebAPI endpoints, or does the WebAPI have to support authentication from clients who aren't logging in via HTML forms? I don't know the exact answer to fit your needs, but here are a few pointers. Let me know if that helps... |
Hi
It's probaby not the right place for this question, but I would like to use MemFlex with RavenDB in a ASP.NET MVC 4 project of mine. I have not used Ninject as IoC before, and would like to ask, how these should be registered using Unity?
/Michael
The text was updated successfully, but these errors were encountered: