Identity UserManager.AddToRole throws exception
问题 As the title says I am using the new C# MVC 5 Identity doing a simple call: UserManager.AddToRole(User.Id, User.RequestedRole); I am doing this in a method of my ViewModel that is called from the Controller The UserManager is created in the Base Class of my ViewModel like this: UserManager = new UserManager<TMUser>(new UserStore<TMUser>(new TMContext())); When I make the above call to AddToRole method, I get this Inner Exception (The outer one is generic/useless): {"A relationship from the