dev_caoql
杨威 7 months ago
parent 1195e020a7
commit eb11da0d96

@ -72,7 +72,7 @@ namespace SlnMesnac.Ioc
{
//自动注入仓储层的接口实现类
var types = assembly.GetTypes()
.Where(t => t.IsClass && !t.IsAbstract && !t.IsGenericType)
.Where(t => t.IsClass && t is { IsAbstract: false, IsGenericType: false })
.ToList();
foreach (var type in types)
@ -125,7 +125,7 @@ namespace SlnMesnac.Ioc
private static void RegisterTypeTransient(ContainerBuilder builder, Assembly assembly)
{
var types = assembly.GetTypes()
.Where(t => t.IsClass && !t.IsAbstract && !t.IsGenericType)
.Where(t => t.IsClass && t is { IsAbstract: false, IsGenericType: false })
.ToList();
foreach (var type in types)

Loading…
Cancel
Save