Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

How to seed "users" in the default tables.

$
0
0

Let's try to explain my situation....

I'm using VS Express 2013 (for web)

I'm in the early stage of the my project...  since my data model will change a lot over the next little while, I'm using a "codefirst" approach where I drop and "re-seed" my database every time I test my code. (no performance issues)

Everything was going well until I tried to use the built-in user management features.

inspired by:

For some reason, the user management tables only get creates after manually "registering" a user in the web interface... and I can't figure how to create those table programmatically into my "Seed"... (the example above use the "migration" approach in a set of table that already exist)  

Also, i'm using 2 different "context"... the default "ApplicationDBContext" for everything related to the "User management" and "TestContext" for everything else... (not sure if it's a problem... or I should try to collapse the 2 into 1)

So it will be great if someone could point to an code example where the "users" are "seeded" every time a code is run.

Thanks in advance for your help


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>