private void ValidateRequest(DataAccessRequest dataAccessRequest, DataAccessConfiguration dataAccessConfiguration) { if (null == dataAccessRequest) { throw new DataAccessRequestException("Data Access Request object is null"); } if (null == dataAccessConfiguration) { throw new DataAccessConfigurationException("Data Access Configuration object is null"); } }
public DataAccessResponse Exceute(DataAccessRequest DataAccessRequest) { DataAccessResponse Response = null; try { DataTable SecurityDataTable; DataTable ParameterDataTable; DataAccessConfiguration DataAccessConfig = (DataAccessConfiguration)ConfigurationManager.GetSection("DataAccessConfiguration"); using (DataAccessManager Manager = new DataAccessManager(DataAccessRequest, DataAccessConfig)) { SecurityDataTable = Manager.BuildSecurityDataTable(); ParameterDataTable = Manager.BuildParameterDataTable(); Response = Manager.BuildResponse(ParameterDataTable); } } catch (DataAccessException Exception) { } return(Response); }
internal DataAccessManager(DataAccessRequest dataAccessRequest, DataAccessConfiguration dataAccessConfiguration) { ValidateRequest(dataAccessRequest, dataAccessConfiguration); _dataAccessRequest = dataAccessRequest; _dataAccessConfiguration = dataAccessConfiguration; }