Geeks With Blogs
Jon Egerton Tips tricks and general musings

I'm setting up a new site, and trying out the EF4.1 Code First method. One thing that occurred to me was the using the Entity Initializers to regenerate the DB leads to the asp_net membership tables (and also any sessions state tables) getting zapped.

My preferred strategy is to override the Seed in my EntityInitializer class (which inherits CreateDatabaseIfNotExists) and execute the aspnet_regsql command to recreate the tables in the database.

See my article for more: http://blog.jonegerton.com/articles/ef4_1_code_first_and_the_asp_net_membership_service.aspx

Posted on Wednesday, August 17, 2011 10:34 AM | Back to top


Comments on this post: EF4.1 Code First and the ASP.Net Membership Service

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Jon Egerton | Powered by: GeeksWithBlogs.net