Exemplo n.º 1
0
 public void OrderByGetLabelNone()
 {
     using (new SoodaTransaction())
     {
         IEnumerable <ContactType> ce = ContactType.Linq().OrderBy(t => t.GetLabel(false));
         CollectionAssert.AreEquivalent(ContactType.GetList(true), ce);
     }
 }
Exemplo n.º 2
0
 public void NoLabel()
 {
     using (new SoodaTransaction())
     {
         ContactTypeList types = ContactType.GetList(true);
         Assert.AreEqual(3, types.Count);
         Assert.IsNull(types[0].GetLabel(false));
         Assert.IsNull(types[1].GetLabel(false));
         Assert.IsNull(types[2].GetLabel(false));
     }
 }
Exemplo n.º 3
0
        public void DoGetListTest()
        {
            using (TestSqlDataSource testDataSource = new TestSqlDataSource("default"))
            {
                testDataSource.Open();

                using (SoodaTransaction tran = new SoodaTransaction())
                {
                    tran.RegisterDataSource(testDataSource);
                    ContactTypeList ctl = ContactType.GetList(tran, SoodaWhereClause.Unrestricted, SoodaSnapshotOptions.Default);
                    foreach (ContactType ct in ctl)
                    {
                        Console.Out.WriteLine("ContactType[{0}]", ct.GetPrimaryKeyValue());
                    }

                    RoleList rl = Role.GetList(tran, SoodaWhereClause.Unrestricted);
                    foreach (Role r in rl)
                    {
                        Console.Out.WriteLine("Role[{0}]", r.GetPrimaryKeyValue());
                    }
                    tran.Commit();
                }
            }
        }