Show / Hide Table of Contents

Class MultitenantDomainContext

A domain context that can be used to retrieve aggregates and save changes with entity framework. Extends the DomainContext with a filter, that ensures correct tenant, when gettings aggregates.

Inheritance
Object
Microsoft.EntityFrameworkCore.DbContext
DomainContext
MultitenantDomainContext
Inherited Members
DomainContext.CallContext
DomainContext.EventSource
DomainContext.IsolationLevel
DomainContext.MetadataProviders
DomainContext.GetById<T>(Guid)
DomainContext.Add<T>(T, Boolean)
DomainContext.Update<T>(T, Boolean)
DomainContext.Delete<T>(T, Boolean)
DomainContext.SaveChanges(Boolean)
DomainContext.SaveChangesCore(Boolean)
DomainContext.SaveChangesAsync(Boolean, CancellationToken)
DomainContext.SaveChangesCoreAsync(Boolean, CancellationToken)
DomainContext.ProcessEntityBeforeSave(EntityEntry<IEntity>, DateTime)
DomainContext.ProcessEntityBeforeSaveAsync(EntityEntry<IEntity>, DateTime)
DomainContext.SetSomÄndrad(IEntity, DateTime)
DomainContext.TransactionTime
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbSetCache.GetOrAddSet(Microsoft.EntityFrameworkCore.Internal.IDbSetSource, System.Type)
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbQueryCache.GetOrAddQuery(Microsoft.EntityFrameworkCore.Internal.IDbQuerySource, System.Type)
Microsoft.EntityFrameworkCore.DbContext.Set<TEntity>()
Microsoft.EntityFrameworkCore.DbContext.Query<TQuery>()
Microsoft.EntityFrameworkCore.DbContext.OnConfiguring(Microsoft.EntityFrameworkCore.DbContextOptionsBuilder)
Microsoft.EntityFrameworkCore.DbContext.SaveChanges()
Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(System.Threading.CancellationToken)
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextPoolable.SetPool(Microsoft.EntityFrameworkCore.Internal.IDbContextPool)
DbContext.IDbContextPoolable.SnapshotConfiguration()
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextPoolable.Resurrect(Microsoft.EntityFrameworkCore.Internal.DbContextPoolConfigurationSnapshot)
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextPoolable.ResetState()
Microsoft.EntityFrameworkCore.DbContext.Dispose()
Microsoft.EntityFrameworkCore.DbContext.Entry<TEntity>(TEntity)
DbContext.Entry(Object)
Microsoft.EntityFrameworkCore.DbContext.Add<TEntity>(TEntity)
Microsoft.EntityFrameworkCore.DbContext.AddAsync<TEntity>(TEntity, System.Threading.CancellationToken)
Microsoft.EntityFrameworkCore.DbContext.Attach<TEntity>(TEntity)
Microsoft.EntityFrameworkCore.DbContext.Update<TEntity>(TEntity)
Microsoft.EntityFrameworkCore.DbContext.Remove<TEntity>(TEntity)
DbContext.Add(Object)
Microsoft.EntityFrameworkCore.DbContext.AddAsync(System.Object, System.Threading.CancellationToken)
DbContext.Attach(Object)
Microsoft.EntityFrameworkCore.DbContext.Update(System.Object)
Microsoft.EntityFrameworkCore.DbContext.Remove(System.Object)
DbContext.AddRange(Object[])
Microsoft.EntityFrameworkCore.DbContext.AddRangeAsync(System.Object[])
Microsoft.EntityFrameworkCore.DbContext.AttachRange(System.Object[])
DbContext.UpdateRange(Object[])
DbContext.RemoveRange(Object[])
Microsoft.EntityFrameworkCore.DbContext.AddRange(System.Collections.Generic.IEnumerable<System.Object>)
DbContext.AddRangeAsync(IEnumerable<Object>, CancellationToken)
Microsoft.EntityFrameworkCore.DbContext.AttachRange(System.Collections.Generic.IEnumerable<System.Object>)
Microsoft.EntityFrameworkCore.DbContext.UpdateRange(System.Collections.Generic.IEnumerable<System.Object>)
Microsoft.EntityFrameworkCore.DbContext.RemoveRange(System.Collections.Generic.IEnumerable<System.Object>)
DbContext.Find(Type, Object[])
DbContext.FindAsync(Type, Object[])
Microsoft.EntityFrameworkCore.DbContext.FindAsync(System.Type, System.Object[], System.Threading.CancellationToken)
Microsoft.EntityFrameworkCore.DbContext.Find<TEntity>(System.Object[])
Microsoft.EntityFrameworkCore.DbContext.FindAsync<TEntity>(System.Object[])
Microsoft.EntityFrameworkCore.DbContext.FindAsync<TEntity>(System.Object[], System.Threading.CancellationToken)
Microsoft.EntityFrameworkCore.DbContext.Database
Microsoft.EntityFrameworkCore.DbContext.ChangeTracker
DbContext.Model
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies.SetSource
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies.QuerySource
DbContext.IDbContextDependencies.EntityFinderFactory
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies.QueryProvider
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies.StateManager
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies.ChangeDetector
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies.EntityGraphAttacher
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies.UpdateLogger
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies.InfrastructureLogger
Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<System.IServiceProvider>.Instance
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: IRM.EntityFrameworkCore
Assembly: IRM.EntityFrameworkCore.dll
Syntax
public class MultitenantDomainContext : DomainContext, IInfrastructure<IServiceProvider>, IDbContextDependencies, IDbSetCache, IDbQueryCache, IDbContextPoolable, IDomainContext, IDbContext, IDisposable

Constructors

MultitenantDomainContext(ICallContext)

Creates a new instance of MultitenantDomainContext.

Declaration
protected MultitenantDomainContext(ICallContext callContext)
Parameters
ICallContext callContext

The service used to access the current call context with information about tenant and user.

MultitenantDomainContext(ICallContext, DbContextOptions)

Creates a new instance of MultitenantDomainContext using the specified options.

Declaration
public MultitenantDomainContext(ICallContext callContext, DbContextOptions options)
Parameters
ICallContext callContext

The service used to access the current call context with information about tenant and user.

Microsoft.EntityFrameworkCore.DbContextOptions options

The options for this context.

Methods

OnModelCreating(ModelBuilder)

Declaration
protected override void OnModelCreating(ModelBuilder modelBuilder)
Parameters
Microsoft.EntityFrameworkCore.ModelBuilder modelBuilder

Overrides
Microsoft.EntityFrameworkCore.DbContext.OnModelCreating(Microsoft.EntityFrameworkCore.ModelBuilder)

Extension Methods

DbContextExtensions.MigrateIfNeeded(DbContext)
DbContextExtensions.IsAllMigrationsApplied(DbContext)
DbContextExtensions.MigrateIfNeededAsync(DbContext)
DbContextExtensions.IsAllMigrationsAppliedAsync(DbContext)
DbContextExtensions.GetWithProcedure<TAggregateList>(DbContext, String, DbParameter[], ITranslate<TAggregateList, IDataReader>, Int32)
SqlExtensions.IsDefaultSchema(DbContext)
JsonExtensions.Serialize<T>(T)
JsonExtensions.Serialize<T>(T, JsonSerializerOptions)
Back to top Generated by DocFX