Run the following SQL script to drop all existing tables:
Monday, January 20, 2025
Refreshing/Clean a Database with SQL and Entity Framework
Quick steps to refresh your database:
1. Drop All Tables
Run the following SQL script to drop all existing tables:
Note: when you try above than you got some errors but don't its because of relationship execute multiple times.
2. Recreate EF Migration Table
Recreate the EF migration table with this script:
3. Update the Database
Run the following command to reapply migrations and update the schema:
update-database
These steps ensure a clean database reset while maintaining EF migration compatibility.
Run the following SQL script to drop all existing tables:
Subscribe to:
Post Comments (Atom)
๐ Agentic Framework 1.0 in .NET: The Power Combo of Semantic Kernel + AutoGen
The AI landscape is shifting fast—from simple prompt-response systems to autonomous, decision-making agents . If you're still building b...
-
Sometimes you add Angular SSR using @angular/ssr, but later want to return to a clean client-side app. Here's how to fully remove SSR (S...
-
Step1: Install Python.Runtime in dotnet. Step2: Install Python in local. Step3: Add Script at same directory "hello.py" . ...
-
In C#, both struct and union are used to create value types, but they are different significantly in memory allocation and usage. __________...
No comments:
Post a Comment