Simple StoredProcedure implementation
Inheritance: Spring.Data.Objects.StoredProcedure
Ejemplo n.º 1
0
        public void OutParamTest()
        {
            TestObjectStoredProcedure sproc = new TestObjectStoredProcedure(dbProvider);
            IDbParameters parameters = sproc.DeclaredParameters;
            Console.WriteLine("\n\n\n");
            for (int i = 0; i < parameters.Count; i++)
            {
                Console.WriteLine("- Declared Parameter " + parameters[i].ParameterName);
            }
            IDictionary results = sproc.GetResults("George");
            foreach (DictionaryEntry entry in results)
            {
                Console.WriteLine(entry.Key + 
                    ", " + entry.Value);
            }

            IDictionary inParams = new Hashtable();
            inParams.Add("@Name", "George");
            results = sproc.GetResultsUsingInDictionary(inParams);
            Console.WriteLine("\n\n\n");
            foreach (DictionaryEntry entry in results)
            {
                Console.WriteLine(entry.Key +
                    ", " + entry.Value);
            }

        }
Ejemplo n.º 2
0
        public void OutParamTest()
        {
            TestObjectStoredProcedure sproc      = new TestObjectStoredProcedure(dbProvider);
            IDbParameters             parameters = sproc.DeclaredParameters;

            Console.WriteLine("\n\n\n");
            for (int i = 0; i < parameters.Count; i++)
            {
                Console.WriteLine("- Declared Parameter " + parameters[i].ParameterName);
            }
            IDictionary results = sproc.GetResults("George");

            foreach (DictionaryEntry entry in results)
            {
                Console.WriteLine(entry.Key +
                                  ", " + entry.Value);
            }

            IDictionary inParams = new Hashtable();

            inParams.Add("@Name", "George");
            results = sproc.GetResultsUsingInDictionary(inParams);
            Console.WriteLine("\n\n\n");
            foreach (DictionaryEntry entry in results)
            {
                Console.WriteLine(entry.Key +
                                  ", " + entry.Value);
            }
        }