1

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.

MaxPayne
  • 1,028
  • 1
  • 12
  • 19
  • This might be a good starting point: http://stackoverflow.com/questions/15112214/using-mvc-4-simplemembership-with-an-existing-database-first-ef-model/15234074#15234074 – Alistair Findlay Mar 18 '13 at 14:08
  • Thanks Alistair Findlay .... I have already solved my problem. Thanks for your efforts. Tried whole day with different solutions and finally solved my problem.I have also used the same way as your post states. – MaxPayne Mar 19 '13 at 03:56
  • Nice one - I'll add a proper reply so you can accept as an answer and close off the issue! – Alistair Findlay Mar 19 '13 at 08:22

1 Answers1

0

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

Community
  • 1
  • 1
Alistair Findlay
  • 1,154
  • 6
  • 12