Skip to content

Commit

Permalink
😊 修复 .NET 9.0 版本的 EFCore 迁移异常 #IB41YD
Browse files Browse the repository at this point in the history
  • Loading branch information
MonkSoul committed Nov 13, 2024
1 parent fba707f commit 4b5309d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ static DatabaseProviderServiceCollectionExtensions()
{
var optionsType = options.GetType();
optionsType.GetMethod("MigrationsAssembly")
optionsType.GetMethods(BindingFlags.Instance | BindingFlags.Public).FirstOrDefault(u => u.GetParameters().Length == 1 && u.GetParameters().First().ParameterType == typeof(string))
.Invoke(options, new[] { Db.MigrationAssemblyName });
// 解决 MySQL/SqlServer/PostgreSQL 有时候出现短暂连接失败问题(v4.8.1.7 版本关闭)
Expand Down

0 comments on commit 4b5309d

Please sign in to comment.