public void UpdateTask(MyTasksEntryModel entryModel) { var task = _dataContext.Tasks.FindSingle(TaskSpecs.GetTaskById(entryModel.Id)); task.Description = entryModel.Description; task.UserId = entryModel.UserId; }
public ActionResult UpdateTask(MyTasksEntryModel entryModel) { if (ModelState.IsValid) { var commands = ServiceFactory.GetCommands(); commands.UpdateTask(entryModel); } return Json("Task Updated"); }
public void SaveTask(MyTasksEntryModel entryModel) { var task = new Task { Description = entryModel.Description, IsCompleted = false, UserId = entryModel.UserId }; _dataContext.Tasks.Add(task); }