mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 10:42:52 +08:00
update demo
This commit is contained in:
parent
b2286fd241
commit
8e19cf23a2
@ -36,11 +36,11 @@ namespace aspnetcore_transaction
|
||||
|
||||
services.AddSingleton<IFreeSql>(Fsql);
|
||||
services.AddScoped<UnitOfWorkManager>();
|
||||
|
||||
//批量注入
|
||||
foreach (var repo in typeof(Startup).Assembly.GetTypes()
|
||||
.Where(a => a.IsAbstract == false && typeof(IBaseRepository).IsAssignableFrom(a)))
|
||||
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);
|
||||
services.AddScoped<SongService>();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user