public static ILHDBTran BeginTransaction(RDatabaseType dbtype, string constr) { PreconditionAssert.IsNotNullOrEmpty(constr, ErrorMessages.DBConnectionStringIsNullOrEmpty); LHDBAccess dbAccess = GetLHDBAccess(dbtype, constr); return(new LHDBTran(dbAccess)); }
public static ILHDBAccess CreateDBAccessInstance(RDatabaseType dbtype, string constr) { PreconditionAssert.IsNotNullOrEmpty(constr, ErrorMessages.DBConnectionStringIsNullOrEmpty); LHDBAccess dbAccess = GetLHDBAccess(dbtype, constr); return(dbAccess); }
private static LHDBAccess GetLHDBAccess(RDatabaseType dbtype, string constr) { switch (dbtype) { case RDatabaseType.MSSQL: return new LHDBMSSql(constr); default: throw new ArgumentException(ErrorMessages.NotSupportedDatabaseType + " - " + dbtype.ToString()); } }
private static LHDBAccess GetLHDBAccess(RDatabaseType dbtype, string constr) { switch (dbtype) { case RDatabaseType.MSSQL: return(new LHDBMSSql(constr)); default: throw new ArgumentException(ErrorMessages.NotSupportedDatabaseType + " - " + dbtype.ToString()); } }
public static ILHDBTran BeginTransaction(RDatabaseType dbtype, string constr) { PreconditionAssert.IsNotNullOrEmpty(constr, ErrorMessages.DBConnectionStringIsNullOrEmpty); LHDBAccess dbAccess = GetLHDBAccess(dbtype, constr); return new LHDBTran(dbAccess); }
public static ILHDBAccess CreateDBAccessInstance(RDatabaseType dbtype, string constr) { PreconditionAssert.IsNotNullOrEmpty(constr, ErrorMessages.DBConnectionStringIsNullOrEmpty); LHDBAccess dbAccess = GetLHDBAccess(dbtype, constr); return dbAccess; }
public static IDbTranAccess BeginTransaction(RDatabaseType dbtype, string constr) { PreconditionAssert.IsNotEmptyString(constr, ErrorMessages.DBConnectionStringIsNullOrEmpty); return(new DbTran(GetLHDBAccess(dbtype, constr))); }