Esempio n. 1
0
        public void TestLUpdate()
        {
            njh.list listObj = map.Get <njh.list>("select * from list where idx=20");
            Assert.AreNotEqual(listObj, null);
            Console.WriteLine("Before Update:");
            if (listObj != null)
            {
                IDictionary <string, object> dic = listObj.Serialize();
                foreach (string iyem in dic.Keys)
                {
                    Console.WriteLine(iyem + " = " + dic[iyem]);
                }
            }
            Console.WriteLine("Now Updates:");
            listObj.classname = listObj.classname.Substring(2);
            listObj.href      = listObj.href.Substring(32);;
            listObj.title     = listObj.title.Substring(32);;
            map.Update <list>(listObj, "", map.Include("classname").Include("href").Columns);

            Console.WriteLine("After Updates:");
            listObj = map.Get <njh.list>("select * from list where idx=20");
            if (listObj != null)
            {
                IDictionary <string, object> dic = listObj.Serialize();
                foreach (string iyem in dic.Keys)
                {
                    Console.WriteLine(iyem + " = " + dic[iyem]);
                }
            }
        }
Esempio n. 2
0
 public void TestLEntity()
 {
     njh.list list = map.Get <njh.list>("select * from list where idx=20");
     Assert.AreNotEqual(list, null);
     if (list != null)
     {
         IDictionary <string, object> dic = list.Serialize();
         foreach (string iyem in dic.Keys)
         {
             Console.WriteLine(iyem + " = " + dic[iyem]);
         }
     }
 }