0

I want to use asp.net identity on a database that already exists.

I read this to do: How to add ASP.NET MVC5 Identity Authentication to existing database

but I am worried because I know asp.net identity uses code first, so can I lose my data? or it simply adds its tables to my db ? and in the future if I will update the asp.net identity package, can it drop the database?

** Now the database has only tables and some data (without others user/password tables)

3
  • does it already have any passwords? Commented Jan 21, 2015 at 15:48
  • @prospector I've updated the firt post Commented Jan 21, 2015 at 16:06
  • As mentioned in the post you provided, you can easily add it to your existing database. So, there's no data lost. It just adds the tables to your database. You will only lose data if you specify your own database initializer (such as drop-create). Why do you want to drop the database when you update your Identity package? Commented Jan 21, 2015 at 16:15

1 Answer 1

1

You shouldn't have any problems since you don't have existing users. The only time you'd have problems with migrating existing users to identity 2.0, because the password hashing, but you'll be good to go.

Always back up your database before you make any changes to the database though.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.