Asp.Net Hein

Asp.Net Hein

  • NA
  • 266
  • 167.1k

How can I make authorization with database role in MVC?

Jun 6 2016 2:15 AM
How can I authorize one of my controller only for the user in England.
 
For example: My database is like that.
DatabaseA (Id, Name, Notes, Country ).
 
In my databaseA_controller, there is one function (eg.Search).
I want to allow this 'search' feature for only the User who is in England.
 
I am using MVC5 and if possible, I want the reference with entity framework in MVC5. 
Kindly let me know if you have idea to do. Thank you for viewing my question. 

Answers (1)