I recently started a new hobby project, requiring me to spin up a new ASP.NET Core project. I’m using Postgres as my RDBMS – and needed to make some modifications, recreate my initial migration, and execute it.
Method ‘Fragment’ in type ‘Microsoft.EntityFrameworkCore.Design.Internal.CSharpHelper’ from assembly ‘Microsoft.EntityFrameworkCore.Design, Version=6.0.11.0, Culture=neutral, PublicKeyToken=adb9793829ddae60’ does not have an implementation.
Unfortunately, it looks like the default ASP.NET Core web project has a bit of a missing NuGet Package. Easily resolved!
- Install the
Microsoft.EntityFrameworkCore.Design
NuGet package. - Run
Add-Migration Initial
via Package Manager Console. - Run
Update-Database
via Package Manager Console. - Validate the migration ran successfully.