public LoggingDomStorageRoutineHandler( AdminkaStorageConfiguration adminkaStorageConfiguration, TUserContext userContext, Action <string> efDbContextVerbose, IHandler <RoutineClosure <TUserContext> > routineHandler, Func <TUserContext, string> getAudit) : this( LoggingDomDataAccessEfCoreManager.CreateLoggingDomEntityMetaServiceContainer(adminkaStorageConfiguration.ConnectionString), userContext, () => LoggingDomDataAccessEfCoreManager.CreateDbContext(adminkaStorageConfiguration, efDbContextVerbose), routineHandler, getAudit) { }
public static IEntityMetaServiceContainer CreateLoggingDomEntityMetaServiceContainer(string connectionString) => new EntityMetaServiceContainer( new LoggingDomDbContext("x", null), (exception, entityType, ormEntitySchemaAdapter, genericErrorField) => StorageResultBuilder.AnalyzeExceptionRecursive( exception, entityType, ormEntitySchemaAdapter, genericErrorField, (ex, storageResultBuilder) => { LoggingDomDataAccessEfCoreManager.Analyze(ex, storageResultBuilder); // TODO disable for InMemory SqlServerManager.Analyze(ex, storageResultBuilder); } ) //(entityType) => new SqlServerOrmEntitySchemaAdapter( entityType), //(modelBuilder) => LoggingDomDbContext.BuildModel(modelBuilder) );