I have a MVC5 application, which uses the n-layer pattern. On my website I have a search engine which allows the user to search for companies matching the query string. The list of retreived companies is filtered depending on the role of the user. What is the best way to manage this in data access? I mean how can I get the user role in my data access? Do you think that is a bad idea to reference the current user in the data access layer? Thanks in advance.
Asked
Active
Viewed 66 times
0
-
can you show what have you tried so far? – Arijit Mukherjee May 25 '15 at 19:49
-
I just transmit the role name the data acces. And I usés à s witch case to filer depond on thé rôle name – Hakim Belekacemi May 25 '15 at 22:49
-
are you using any roles in DB? – Arijit Mukherjee May 26 '15 at 06:02
-
yes of course I have many roles – Hakim Belekacemi May 26 '15 at 06:49