Beispiel #1
0
        public void Test()
        {
            PersonAccessor pa = DataAccessor.CreateInstance <PersonAccessor>();

            // ExecuteScalar.
            //
            Assert.IsTrue(pa.GetCount() > 0);

            // Insert and get id.
            //
            Person person = new Person();

            person.FirstName = "Crazy";
            person.LastName  = "Frog";
            person.Gender    = Gender.Unknown;

            int id = pa./*[a]*/ Insert(person) /*[/a]*/;

            Assert.IsFalse(id == 0);

            new SprocQuery <Person>().DeleteByKey(id);
        }