0

How can I in my custom controller get an instance of ApplicationUserManager so that I can find a user by its id and then be able to update the user?

1 Answer 1

1

Simply call:

var userManager = HttpContext.GetOwinContext().GetUserManager<ApplicationUserManager>();

inside any action you want to access the user manager. you also need to add following namespace also:

using Microsoft.AspNet.Identity.Owin;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.