The name "SqlServerValueGenerationStrategy" does not exist in the current context

Viewed 1408

I am using ASP.NET Core 2.1. After I create my API project, I run following commands

Add-Migration MOBAPP -Project OVMInfrastructure
Update-Database

When I run the update-database, I get this error:

The name "SqlServerValueGenerationStrategy" does not exist in the current context

I re-installed the following Nuget packages

Microsoft.EntityFrameworkCore.SqlServer

but it's still not working.

Click here to see my error picture.

1 Answers

Follow Steps below:

  1. Install Package Microsoft.EntityFrameworkCore version 2.1.0 in JSAInfrastructure
  2. Install Package Microsoft.EntityFrameworkCore.Relational version 2.1.0 in JSAInfrastructure
  3. Install Package Microsoft.EntityFrameworkCore.SqlServer version 2.1.0 in JSAInfrastructure
  4. Update Microsoft.EntityFrameworkCore.SqlServer to version 2.1.0 in JSAAPI
  5. Build your project

Result

Related