开始一个新项目,并尝试设置数据库进行身份验证。我在powershell中运行以下命令。dotnet ef database update -Context ApplicationDbContext
并得到以下错误Unrecognized option '-Context'
所以我尝试不带-Context选项运行它,只是为了查看和获取:
More than one DbContext was found. Specify which one to use. Use the '-Context' parameter
for PowerShell commands and the '--context' parameter for dotnet commands.
我也尝试使用--context而不是-context来运行它,但是得到了同样的错误。关于为什么它识别出我需要该选项的任何建议,但同时又告诉我它不识别该选项?
我也重新启动powershell。
而不是使用--context ApplicationDbContext
你试过-c ApplicationDbContext
https://docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet#aspnet-core-environment
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句