EFcore
落叶@Henry
.net 开发
展开
-
迁移EntityFramework core出现多个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,在迁移的时候需要标明`add-migration init -c BaseContextupdate-database -contex原创 2021-11-18 09:02:53 · 461 阅读 · 0 评论 -
EFcore 保存出现并发被提前修改的报错
EFcore 保存出现并发被提前修改的报错提示语言Database operation expected to affect 1 row(s) but actually affected 0 row(s). public static void EFNewExecute(Action<DbContext> executeAction, DbContext context, bool isCheckConcurrent = false) { ...原创 2021-11-12 16:01:39 · 1721 阅读 · 0 评论