示例#1
0
文件: ListTest.cs 项目: pondyond/db4o
        private void ModifyInProviderB()
        {
            ListHolder lh = (ListHolder)GetOneInstance
                                (B(), typeof(ListHolder));

            lh.SetName("h2");
            IEnumerator itor = lh.GetList().GetEnumerator();

            itor.MoveNext();
            ListContent lc1 = (ListContent)itor.Current;

            itor.MoveNext();
            ListContent lc2 = (ListContent)itor.Current;

            lc1.SetName("co1");
            lc2.SetName("co2");
            B().Provider().Update(lc1);
            B().Provider().Update(lc2);
            B().Provider().Update(lh.GetList());
            B().Provider().Update(lh);
            B().Provider().Commit();
            EnsureContent(B(), new string[] { "h2" }, new string[] { "co1", "co2" });
        }