File tree 2 files changed +15
-0
lines changed 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,14 @@ public static UnitOfWorkFactory GetUserUnitOfWorkFactory(this IServiceProvider s
70
70
return serviceProvider . GetRequiredService < IArbitraryUserUnitOfWorkCache > ( ) . GetUserUnitOfWorkFactory ( userId ) ;
71
71
}
72
72
73
+ /// <summary>
74
+ /// Returns a UnitOfWork that is configured to use the provided Guid for determining the current user.
75
+ ///
76
+ /// <b>You MUST call .Return() on the result of this function once it's not required any more.</b>
77
+ /// </summary>
78
+ /// <param name="serviceProvider">this</param>
79
+ /// <param name="userId">The id of the user that the UnitOfWork should use for authorization.</param>
80
+ /// <returns>A UnitOfWork that is configured to use the provided Guid for determining the current user.</returns>
73
81
public static IUnitOfWork GetUserUnitOfWork ( this IServiceProvider serviceProvider , Guid userId )
74
82
{
75
83
return serviceProvider . GetRequiredService < IArbitraryUserUnitOfWorkCache > ( ) . GetUserUnitOfWork ( userId ) ;
Original file line number Diff line number Diff line change @@ -9,6 +9,13 @@ public static UnitOfWorkFactory GetSystemUserUnitOfWorkFactory(this IServiceProv
9
9
return serviceProvider . GetUserUnitOfWorkFactory ( SystemUserGuid ) ;
10
10
}
11
11
12
+ /// <summary>
13
+ /// Returns a UnitOfWork that is configured to use the system user for authorization.
14
+ ///
15
+ /// <b>You MUST call .Return() on the result of this function once it's not required any more.</b>
16
+ /// </summary>
17
+ /// <param name="serviceProvider">this</param>
18
+ /// <returns>A UnitOfWork that is configured to use the system user for authorization.</returns>
12
19
public static IUnitOfWork GetSystemUserUnitOfWork ( this IServiceProvider serviceProvider )
13
20
{
14
21
return serviceProvider . GetUserUnitOfWork ( SystemUserGuid ) ;
You can’t perform that action at this time.
0 commit comments