I found this post on using the simple membership provider that ships with MVC 4.
Using MVC 4 SimpleMembership with an existing database-first EF model
I already have a data layer set up using IOc etc using the ef code first approach. Every thing is pretty clean at the moment and I want to keep it that way. The above post is great and explains a lot but there is one question that is not answered...
HOW DOES THIS FIT IN WITH CODE FIRST MIGRATIONS (Sorry for the caps)
The point I am making is currently my entities are mapped to the database, when I make changes to the entities the database updates, I can add seed data etc.
Now how do the membership tables that are created fit in to all of this.
Do they get created each time I run the application? What order are the tables created in? i.e. My custom tables then the membership ones. When does the seed code run?
Any ideas?
One last thing the post says that you need to provide a connection 'string'... and you cant use your ef entities to get the connection string..
I do not want to have a direct reference from the MVC site directly to the database even if that is just a connection string... surely this should come via a service?