From 791d3fd96fa406f1f0b8bf850aa6bf85d7256756 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Fri, 13 Dec 2024 22:27:04 -0700 Subject: [PATCH] fix: MultiTenantDbContext.Create should have non nullable TenantInfo parameter --- .../MultiTenantDbContext.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Finbuckle.MultiTenant.EntityFrameworkCore/MultiTenantDbContext.cs b/src/Finbuckle.MultiTenant.EntityFrameworkCore/MultiTenantDbContext.cs index fb1a64fa..1a150549 100644 --- a/src/Finbuckle.MultiTenant.EntityFrameworkCore/MultiTenantDbContext.cs +++ b/src/Finbuckle.MultiTenant.EntityFrameworkCore/MultiTenantDbContext.cs @@ -28,7 +28,7 @@ public abstract class MultiTenantDbContext : DbContext, IMultiTenantDbContext /// The TContext implementation type. /// The ITenantInfo implementation type. /// - public static TContext Create(TTenantInfo? tenantInfo) + public static TContext Create(TTenantInfo tenantInfo) where TContext : DbContext where TTenantInfo : class, ITenantInfo, new() => Create(tenantInfo, null); @@ -41,7 +41,7 @@ public static TContext Create(TTenantInfo? tenantInfo) /// The TContext implementation type. /// The ITenantInfo implementation type. /// - public static TContext Create(TTenantInfo? tenantInfo, DbContextOptions? options) + public static TContext Create(TTenantInfo tenantInfo, DbContextOptions? options) where TContext : DbContext where TTenantInfo : class, ITenantInfo, new() {