how to enable migration in package manager console

To enable migration in Package Manager Console for C# language, use the following command:

Enable-Migrations

Ensure that you have the necessary Entity Framework package installed:

Install-Package EntityFramework

After enabling migrations, create a new migration with:

Add-Migration YourMigrationName

Finally, apply the migration to update the database:

Update-Database