public static DALContext OpenDALContext(MySqlConnection EstablishedConnection, MySqlTransaction SqlTransaction = null) => CurrentContext = CurrentContext ?? new DALContext(EstablishedConnection, SqlTransaction: SqlTransaction);
public static void CloseDALContext() { CurrentContext?.Dispose(); CurrentContext = null; }
//***************** DAL Context *****************// public static DALContext OpenDALContext(Enum ConfigConnectionString, bool AllowUserVariables = false, bool AutomaticallyOpenConnection = true) => CurrentContext = CurrentContext ?? new DALContext(ConfigConnectionString, AllowUserVariables: AllowUserVariables, AutomaticallyOpenConnection: AutomaticallyOpenConnection);