Skip to content

Commit

Permalink
fix: MultiTenantDbContext.Create should have non nullable TenantInfo …
Browse files Browse the repository at this point in the history
…parameter
  • Loading branch information
AndrewTriesToCode committed Dec 14, 2024
1 parent 52495fb commit 791d3fd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public abstract class MultiTenantDbContext : DbContext, IMultiTenantDbContext
/// <typeparam name="TContext">The TContext implementation type.</typeparam>
/// <typeparam name="TTenantInfo">The ITenantInfo implementation type.</typeparam>
/// <returns></returns>
public static TContext Create<TContext, TTenantInfo>(TTenantInfo? tenantInfo)
public static TContext Create<TContext, TTenantInfo>(TTenantInfo tenantInfo)
where TContext : DbContext
where TTenantInfo : class, ITenantInfo, new()
=> Create<TContext, TTenantInfo>(tenantInfo, null);
Expand All @@ -41,7 +41,7 @@ public static TContext Create<TContext, TTenantInfo>(TTenantInfo? tenantInfo)
/// <typeparam name="TContext">The TContext implementation type.</typeparam>
/// <typeparam name="TTenantInfo">The ITenantInfo implementation type.</typeparam>
/// <returns></returns>
public static TContext Create<TContext, TTenantInfo>(TTenantInfo? tenantInfo, DbContextOptions? options)
public static TContext Create<TContext, TTenantInfo>(TTenantInfo tenantInfo, DbContextOptions? options)
where TContext : DbContext
where TTenantInfo : class, ITenantInfo, new()
{
Expand Down

0 comments on commit 791d3fd

Please sign in to comment.