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;
        }
Exemplo n.º 2
0
        public virtual void UpdateList(TaskList list)
        {
            var context     = new TaskDataContext();
            var taskListRow = list.ToRow();

            context.AttachTo(TaskDataContext.TaskListTable, taskListRow, "*");
            context.UpdateObject(taskListRow);
            context.SaveChanges();
        }
Exemplo n.º 3
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);
        }
        public virtual void UpdateList(TaskList list)
        {
            var context = new TaskDataContext();
            var taskListRow = list.ToRow();

            context.AttachTo(TaskDataContext.TaskListTable, taskListRow, "*");
            context.UpdateObject(taskListRow);
            context.SaveChanges();
        }