Simple StoredProcedure implementation
Inheritance: Spring.Data.Objects.StoredProcedure
        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);
            }

        }
示例#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);
            }
        }