Exemple #1
0
        private static decimal InsertSomething(Tasks db, string description)
        {
            dynamic data = new ExpandoObject();
            data.Description = description;

            dynamic retVal = db.Insert(data);
            return retVal.ID;
        }
Exemple #2
0
        private static void CreateReadAndUpdateTask(Tasks db)
        {
            decimal id = InsertSomething(db, "blow nose");
            Console.WriteLine("New id: " + id);

            dynamic task = db.Single(id);
            task.Description = "blow nose loudly";

            db.Update(task, id);
        }
Exemple #3
0
        static void Main(string[] args)
        {
            var db = new Tasks();

            //AdHocQuery();
            //QueryAll(db);

            //CreateReadAndUpdateTask(db);

            //Console.WriteLine("Hello world!");

            //DeleteSomething(db);
        }
Exemple #4
0
 private static void QueryAll(Tasks db)
 {
     var tasks = db.All();
     ShowListOfData(tasks);
 }
Exemple #5
0
 private static void DeleteSomething(Tasks db)
 {
     decimal id = InsertSomething(db, "foo");
     db.Delete(id);
 }