public DrawingDalImpl(IConfiguration configuration)// TODO:change to IConfiguration - COMPLETED { _configuration = configuration; var strConn = _configuration.GetConnectionString("mainDb"); _infraDal = new InfraDalImpl(); _connection = _infraDal.Connect(strConn); }
public DataSet ExecuteQuery(IDbConnection connection, string query) { var command = new OracleCommand { CommandText = query, Connection = (connection as OracleConnectionAdapter)?.Connection }; return(getDataSet(command)); }
public DataSet ExecuteSpQuery(IDbConnection connection, string spName, params IDbParameter[] parameters) { var command = new OracleCommand { CommandText = spName, CommandType = CommandType.StoredProcedure, Connection = (connection as OracleConnectionAdapter)?.Connection }; foreach (var parameter in parameters) { command.Parameters.Add((parameter as OracleParameterAdapter)?.Parameter); } return(getDataSet(command)); }