Ejemplo n.º 1
0
        private static void TestXmlDatabase()
        {
            XmlDatabase db = new XmlDatabase(@"C:\tmp");

            db.OutputIndent = true;

            Cat origin = new Cat()
            {
                Name = "Garfield", Legs = 4
            };

            db.Save <Cat>(origin);

            db.Save <Cat>(origin.Id, origin);
            db.Delete <Cat>(origin.Id);
        }
Ejemplo n.º 2
0
        //private static void TestJsonDatabase()
        //{
        //    JsonDatabase db = new JsonDatabase(@"C:\tmp");
        //    db.OutputIndent = true;

        //    Cat origin = new Cat() { Name = "Garfield", Legs = 4 };
        //    db.Save<Cat>(origin);

        //    db.Save<Cat>(origin.Id, origin);
        //    db.Delete<Cat>(origin.Id);
        //}

        private static void TestXmlDatabase()
        {
            XmlDatabase db = new XmlDatabase(@"C:\tmp");

            db.OutputIndent = true;

            Cat origin = new Cat()
            {
                Name = "Garfield", Legs = 4
            };

            db.Save <Cat>(origin);

            db.Save <Cat>(origin.Id, origin);

            IEnumerable <Cat> founds = db.FindAll <Cat>();

            Cat found = db.FindOneById <Cat>(origin.Id);


            db.Delete <Cat>(origin.Id);
        }
Ejemplo n.º 3
0
        private static void TestXmlDatabase()
        {
            XmlDatabase db = new XmlDatabase(@"C:\tmp");
              db.OutputIndent = true;

              Cat origin = new Cat() { Name = "Garfield", Legs = 4 };
              db.Save<Cat>(origin);

              db.Save<Cat>(origin.Id, origin);
              db.Delete<Cat>(origin.Id);
        }