示例#1
0
        public void UpdateTask(MyTasksEntryModel entryModel)
        {
            var task = _dataContext.Tasks.FindSingle(TaskSpecs.GetTaskById(entryModel.Id));

            task.Description = entryModel.Description;
            task.UserId = entryModel.UserId;

        }
示例#2
0
 public ActionResult UpdateTask(MyTasksEntryModel entryModel)
 {
     if (ModelState.IsValid)
     {
         var commands = ServiceFactory.GetCommands();
         commands.UpdateTask(entryModel);
     }
     return Json("Task Updated");
 }
示例#3
0
 public void SaveTask(MyTasksEntryModel entryModel)
 {
     var task = new Task
     {
         Description = entryModel.Description,
         IsCompleted = false,
         UserId = entryModel.UserId
     };
     _dataContext.Tasks.Add(task);
 }