so i have the next problem. I have a controller and some user roles. I'm using string when i have [Authorize(Roles="Admin")]
but i want to use an enum like that because if i change the name of role i will modify in one single place.
I already tried Roles=UserRoles.Admin.ToString()
, where UserRoles is my enum but i'm getting an error. I already read aricles from here but seems that no one helps me to solve my problem.
Could you help me with any suggestion?