We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2286fd commit 8e19cf2Copy full SHA for 8e19cf2
Examples/aspnetcore_transaction/Startup.cs
@@ -36,11 +36,11 @@ public void ConfigureServices(IServiceCollection services)
36
37
services.AddSingleton<IFreeSql>(Fsql);
38
services.AddScoped<UnitOfWorkManager>();
39
-
40
- //批量注入
41
- foreach (var repo in typeof(Startup).Assembly.GetTypes()
42
- .Where(a => a.IsAbstract == false && typeof(IBaseRepository).IsAssignableFrom(a)))
43
- services.AddScoped(repo);
+ services.AddFreeRepository(null, typeof(Startup).Assembly);
+ ////批量注入
+ //foreach (var repo in typeof(Startup).Assembly.GetTypes()
+ // .Where(a => a.IsAbstract == false && typeof(IBaseRepository).IsAssignableFrom(a)))
+ // services.AddScoped(repo);
44
services.AddScoped<SongService>();
45
}
46
0 commit comments