SharedAcrossTenantsAttribute class
Namespace: Tenantry.EfCore · Package: Tenantry.EfCore · API reference
Marks an entity type whose rows every tenant shares, such as a country list or the tenant table itself, so TenantModel.FindUnisolatedEntityTypes does not report it. It changes nothing in queries or saves.
Packages that keep tenants apart in a shared database by query filters alone, such as Tenantry.Pro's mixed mode, refuse a model with an entity type that is neither tenant-owned nor marked this way. Mark it in the model instead with modelBuilder.Entity<T>().IsSharedAcrossTenants(). An entity type that implements ITenantEntity<TKey> cannot be marked.
[AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = false)]
public sealed class SharedAcrossTenantsAttribute : AttributeInherits Attribute.
SaveWithoutTransactionBehavior enum
What SaveChanges does, with Database.AutoTransactionBehavior set to Never and no transaction, when the tenant check of some rows it writes is another of its statements: owned rows in a table of their own, checked by their owner's statement, and the rows of an entity mapped to more than one table table-per-type, entity splitting, checked in the table with TenantId.
TenantContextGuard class
An extension point: for code that extends the package, such as another package that builds on it.