ScopedServiceExtensions.

WithScoped<T>(IServiceScopeFactory) Method

Summary

Get a service that runs actions with a new scope every time

Syntax

public static IExecuteScoped<T> WithScoped<T>(this IServiceScopeFactory serviceScopeFactory)

Attributes

Type Description
NullableContextAttribute

Type Parameters

Name Description
T

Parameters

Name Type Description
serviceScopeFactory IServiceScopeFactory The service scope factory

Return Value

Type Description
IExecuteScoped<T>