Refactored registration of Features service from Scoped to Transient
continuous-integration/drone/pr Build is passing
continuous-integration/drone/pr Build is passing
This commit is contained in:
@@ -12,7 +12,7 @@ public static class Shop
|
|||||||
var sharedImplementations = typeof(IFeatures).Assembly.GetTypes()
|
var sharedImplementations = typeof(IFeatures).Assembly.GetTypes()
|
||||||
.Where(t => serviceType.IsAssignableFrom(t) && t.IsClass && !t.IsAbstract);
|
.Where(t => serviceType.IsAssignableFrom(t) && t.IsClass && !t.IsAbstract);
|
||||||
|
|
||||||
foreach (var sharedImplementation in sharedImplementations) services.AddScoped(sharedImplementation);
|
foreach (var sharedImplementation in sharedImplementations) services.AddTransient(sharedImplementation);
|
||||||
|
|
||||||
var coreImplementations = typeof(IMidrandBooks).Assembly.GetTypes()
|
var coreImplementations = typeof(IMidrandBooks).Assembly.GetTypes()
|
||||||
.Where(t => serviceType.IsAssignableFrom(t) && t.IsClass && !t.IsAbstract);
|
.Where(t => serviceType.IsAssignableFrom(t) && t.IsClass && !t.IsAbstract);
|
||||||
|
|||||||
Reference in New Issue
Block a user