anouar
anouar

Reputation: 317

Managing Roles In ASP MVC 3 Code First Approach

I am developing an ASP .Net MVC 3 application using C# and SQL Server 2005.

I am using also Entity Framework and Code First Method.

I have an interface Login that works perfectly.

My problem that I have 3 Types of Users :

and each one has a custom access to the pages of the application.

I search on the net and I found many tutos describing how to manage Roles but all are not using a database or using an existing database with ADO .NET, database first

My problem that I am using ENTITY FRAMEWORK and CODE FIRST.

tables

This is what I have in my base . How can I bind this tables with my code ? I already used [Authorize] in some action and its works perfectly but now how I use [Authorize (Roles="Admin")] with my database.

Upvotes: 0

Views: 1217

Answers (1)

Related Questions