title: Check whether a user name is mapped to a role
body: <p>I am developing a ASP NET MVC 5 website wherein I need to provide a WebApi for a WPF client. The client needs to send user name and password for the user, and the WebApi needs to check whether the user name and password are correct and whether the user name belongs to the admin role (defined by my website).</p>
  
  <p>I am using Visual Studio 2013, so for adding roles, I directly add entries into AspNetRoles and AspNetUserRoles tables using Server Explorer. (say for example, I added admin role, and mapped user1 to admin role)</p>
  
  <p>I find that to check the user name and password is correct, I can use the same code as used by the login functionality in the default account controller. I am finding trouble finding an API to check user name against a role name. I am not adding roles programmatically; I just want to check whether user1 was mapped to the admin role in the AspNetUserRoles table.</p>
  
  <p>Can anyone suggest how to do that ?</p>