iammukeshm/CleanArchitecture.WebApi

Unrecognized option '-Context' when running dotnet ef command

lukeconner opened this issue · 4 comments

Describe the bug
When following the commands to install, after dotnet restore it gives the error Unrocognized option '-Context'

To Reproduce
Steps to reproduce the behavior:

  1. Clone Project
  2. Change connection string
  3. Run dotnet restore
  4. Run dotnet-ef database update -Context ApplicationDbContext

Expected behavior
I expected it would create the tables

Desktop (please complete the following information):

  • OS: Windows 10
  • 3.1 SDK installed

I have no idea why this is an issue, but using -c instead of -Context resolved the issue.

That's weird. Is your ef code updated to the latest version?

Yeah, I reinstalled the SDK just to be sure. Likely it's something with my local setup.

dotnet-ef database update -c ApplicationDbContext
it will fix the problem