Beispiel #1
0
        public void StoreTypes <TContext>(ContextSupportTypeDto supportTypes)
            where TContext : IDbContext
        {
            if (supportTypes == null)
            {
                throw new ArgumentNullException(nameof(supportTypes));
            }

            this.contextSupportTypeCache.Add(typeof(TContext), supportTypes);
        }
Beispiel #2
0
        public ContextSupportTypeDto BuildContextTypes <TContext>()
            where TContext : IDbContext
        {
            var allTypesInContextAssembly     = this.GetTypesInContextImplementationAssembly <TContext>();
            var entityInterfaceForContextType = this.GetEntityInterfaceForContextType <TContext>();

            var supportTypes = new ContextSupportTypeDto
            {
                ConfigTypes = this.GetConfigTypes(allTypesInContextAssembly, entityInterfaceForContextType),
            };

            return(supportTypes);
        }
Beispiel #3
0
 public SecondaryContext(DbContextOptions options, ContextSupportTypeDto contextSupport)
     : base(options, contextSupport)
 {
 }
Beispiel #4
0
 protected EfCoreContext(DbContextOptions options, ContextSupportTypeDto contextSupport)
     : base(options)
 {
     this.contextSupport = contextSupport;
 }