Question

I created a new web application in VS2013 and chose "Single Page Application" to see how the OWIN OAuth authentication was setup. Everything works great, however when trying to migrate the behavior to an existing application, I am not seeing where to change the database context to point it to our existing database?

In "Startup.Auth.cs" I see the following line ->

UserManagerFactory = () => new UserManager<IdentityUser>(new UserStore<IdentityUser>());

Which can take a DbContext as a parameter. Do I have to create a new instance of the context here and pass it in? Will this keep the context open indefinitely or per request?

Était-ce utile?

La solution

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top