Open ZengOwen opened 2 years ago
应该是没引用 OSharpNS.EntityFrameworkCore.MySql
把Startup.cs 的 ConfigureServices 加上AddPack《MySqlDefaultDbContextMigrationPack》() 可以了
但是执行建立数据库时,依然报错 PM> Update-Database Build started... Build succeeded. System.ArgumentException: An item with the same key has already been added. Key: OSharp.Entity.DefaultDbContext at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
另外,如果自定义了个Controller, 其中实现了action及对应的url, 那么权限控制表里,会出现这个新的url吗
PM> Update-Database Build started... Build succeeded. OSharp.Exceptions.OsharpException: 无法解析类型为“MySql”的 OSharp.Entity.IDbContextOptionsBuilderDriveHandler 实例
是我哪里没做对吗