Search code examples
asp.net-mvc-4simplemembership

MVC4 Simple Membership with custom database and database first issue


I am implementing Membership and security in my MVC4 website using custom database. Every things working fine but when I used .EDMX(Designer) to add my database tables membership and security starts giving errors. I also know the reason: This is due to duplicate Class files as default membership use code first approach and I am using database first approach. My question is there is any soluton that I can work using database first(EDMX) and also my security and membership functionality works fine.

Thanks.


Solution

  • The following post details the steps to take when using SimpleMembership with a Database-First approach: Using MVC 4 SimpleMembership with an existing database-first EF model

    Also, you may find the following link has some useful information about SimpleMembership: http://weblogs.asp.net/jgalloway/archive/2012/08/29/simplemembership-membership-providers-universal-providers-and-the-new-asp-net-4-5-web-forms-and-asp-net-mvc-4-templates.aspx