コード例 #1
0
        public void Insert()
        {
            using (var conn = DbHelper.GetConn())
            {
                PeopleTable people = new PeopleTable();
                people.Name = "李四" + Second;
                people.Sex  = Second;
                int effect = conn.Insert(people);

                StudentTable student = new StudentTable();
                student.Id   = ObjectId.GenerateNewId().ToString();
                student.Name = "王五" + Second;
                student.Sex  = Second;
                effect      += conn.Insert(student);
                Assert.Pass(effect.ToString());
            }
        }
コード例 #2
0
        public void Insert()
        {
            using (var conn = DbHelper.GetConn())
            {
                PeopleTable people = new PeopleTable();
                people.Name = "李四" + Second;
                people.Sex  = Second;
                int effect = conn.InsertAsync(people).Result;

                StudentTable student = new StudentTable();
                student.Id   = ObjectId.GenerateNewId().ToString();
                student.Name = "王五" + Second;
                student.Sex  = Second;
                int effect2 = conn.InsertAsync(student).Result;

                string msg = string.Format("\n effect:{0} \n effsct2:{1}", effect, effect2);
                Assert.Pass(msg);
            }
        }