예제 #1
0
        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");
            }
        }
예제 #2
0
        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);
        }
예제 #3
0
 internal DataAccessManager(DataAccessRequest dataAccessRequest, DataAccessConfiguration dataAccessConfiguration)
 {
     ValidateRequest(dataAccessRequest, dataAccessConfiguration);
     _dataAccessRequest       = dataAccessRequest;
     _dataAccessConfiguration = dataAccessConfiguration;
 }