public IList <FindUserWarehousesResult> FindUserWarehouses(FindUserWarehousesParameters parameters)
        {
            using (TransactionScope scope = new TransactionScope())
            {
                IList <FindUserWarehousesResult> result = null;

                using (IDbConnection connection = new DbConnection(ConnectionString))
                {
                    connection.Open();

                    using (IDbCommand command = connection.CreateCommand())
                    {
                        command.CommandText = StatementCache.Instance.GetCachedStatement("Imi.SupplyChain.Warehouse.Authentication.DataAccess.Queries.FindUserWarehouses.sql");
                        ((OracleCommand)command).BindByName = true;

                        foreach (IDbDataParameter parameter in FindUserWarehousesTranslator.TranslateParameters(parameters))
                        {
                            command.Parameters.Add(parameter);
                        }

                        command.Prepare();

                        using (IDataReader reader = command.ExecuteReader())
                        {
                            result = FindUserWarehousesTranslator.TranslateResultSet(reader);
                        }
                    }
                }

                scope.Complete();

                return(result);
            }
        }
        public IList <FindUserWarehousesResult> FindAllWarehouses()
        {
            using (TransactionScope scope = new TransactionScope())
            {
                IList <FindUserWarehousesResult> result = null;

                using (IDbConnection connection = new DbConnection(ConnectionString))
                {
                    connection.Open();

                    using (IDbCommand command = connection.CreateCommand())
                    {
                        command.CommandText = StatementCache.Instance.GetCachedStatement("Imi.SupplyChain.Warehouse.Authentication.DataAccess.Queries.FindAllWarehouses.sql");
                        command.Prepare();

                        using (IDataReader reader = command.ExecuteReader())
                        {
                            result = FindUserWarehousesTranslator.TranslateResultSet(reader);
                        }
                    }
                }

                scope.Complete();

                return(result);
            }
        }