You've modified the properties of the IdentityUser class in your ASP.NET Core project. Before deploying these changes to production, which of the following steps is crucial to ensure the database reflects these modifications?
- Delete the existing database and recreate it
- Run Entity Framework Core's "Add-Migration" command
- Manually update the database schema
- No action needed
To ensure the database reflects the modified IdentityUser class, you should run Entity Framework Core's "Add-Migration" command. This command generates a new migration containing the necessary SQL scripts to update the database schema to match the changes made to your model.
Loading...
Related Quiz
- You are working on an ASP.NET Core web API project, and you realize that direct database operations can expose sensitive information in the error messages to the clients. How can you ensure that Entity Framework Core doesn't throw detailed database errors to the client?
- Which ASP.NET Core middleware is responsible for enabling session state in the application?
- Which command is commonly used to create a new migration for ASP.NET Core Identity changes?
- You're tasked with developing a system where the user's account gets temporarily locked after 5 consecutive failed login attempts. Which ASP.NET Core Identity feature would you utilize?
- During your web development learning, you encounter the term "Razor syntax." How is Razor syntax beneficial in ASP.NET Core development?