Esempio n. 1
0
        public void LoadLogger(ConnectionFactory.ConnectionMethod conn, string connectionString = null,
                               bool killConnectionOnCtxDispose = false, DbConnection changeLogConnectionContext = null)
        {
            DbConnection connToUse = changeLogConnectionContext;

            if (connToUse == null && ctx != null)
            {
                connToUse = ctx.Database.Connection;
            }

            if (!String.IsNullOrWhiteSpace(connectionString) || conn == ConnectionFactory.ConnectionMethod.AppSettingsConnectionString || connToUse != null)
            {
                logger = ChangeLoggerContext_Factory.CreateChangeLogger(conn, connectionString, connToUse, killConnectionOnCtxDispose);
            }

            KillConnectionOnDispose = killConnectionOnCtxDispose;
        }
Esempio n. 2
0
 public UnitOfWork(ErpContext context, IChangeLogger changeLogger)
 {
     _context      = context;
     _changeLogger = changeLogger;
 }