mmacneil / AngularASPNETCore2WebApiAuth

Sample project demonstrating jwt-based authentication with an Angular (v5.2.1) frontend and ASP.NET Core 2 WebApi. Includes both local user registration with .NET Core Identity membership and facebook login scenarios.
https://fullstackmark.com/post/13/jwt-authentication-with-aspnet-core-2-web-api-angular-5-net-core-identity-and-facebook-login
MIT License
473 stars 238 forks source link

Recreate Database into Local #14

Closed mcabram closed 5 years ago

mcabram commented 5 years ago

Hi Mr.Mark, thank you for your great work! I've tried the code but I found the EF fails to create new database according to DefaultConnection since I changed the connection to my local database.

Reproduce the problem:

  1. I update the DefaultConnection to my local database.
  2. I manually delete all files under Migrations and Migrations folder.
  3. I run command 'Add-Migration Initial' to create a new migration.
  4. I run command 'Update-Database' to create database and tables.
  5. But I fail to find the expected new database in my local machine.

Any helps will be highly appreciated!

mmacneil commented 5 years ago

What error do you receive?

mcabram commented 5 years ago

What error do you receive?

Dear Mark, thank you for your response. I solved it now. It seems there is a kind of delay in database creation from EF.