Implementing role based authorization in MVC and Web API with custom table
问题 I have inherited an application with database. The database has following tables related to authentication and authorization. User Table UserName Password UserTypeId UserType Table UserTypeId UserTypeDesc The User Type table stores the roles for the user e.g. Admin, Editor, etc. If I want to implement authorization like below [Authorize(Roles="Admin, Editor")] public IHttpActionResult GetOrders() { //Code here } Where and what should I code so that the roles are available to the authorize