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(); }
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); }