Beispiel #1
0
        public virtual void CreateTask(Task task)
        {
            var context = new TaskDataContext();

            context.AddObject(TaskDataContext.TaskTable, task.ToRow());
            context.SaveChanges();
        }
Beispiel #2
0
        public virtual TaskList CreateList(string name, bool publicList)
        {
            var context = new TaskDataContext();
            var list    = new TaskList {
                Name = name, IsPublic = publicList
            };

            context.AddObject(TaskDataContext.TaskListTable, list.ToRow());
            context.SaveChanges();

            return(list);
        }