Skip to content

Commit

Permalink
Update so that TContext must matched context type exactly (e.g. no de…
Browse files Browse the repository at this point in the history
…rived classes)
  • Loading branch information
AndrewTriesToCode committed Jan 28, 2025
1 parent 044ed02 commit f4cf2d9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ public static MultiTenantBuilder<TTenantInfo> WithDelegateStrategy<TContext, TTe

Func<object, Task<string?>> wrapStrategy = context =>
{
if (context is TContext typedContext)
if (context.GetType() == typeof(TContext))
{
return doStrategy(typedContext);
return doStrategy((TContext)context);
}

return Task.FromResult<string?>(null);
Expand Down

0 comments on commit f4cf2d9

Please sign in to comment.