Beispiel #1
0
 public ActionResult DeleteTask(MyTasksIdEntryModel entryModel)
 {
     if (ModelState.IsValid)
     {
         var commands = ServiceFactory.GetCommands();
         commands.DeleteTask(entryModel);
     }
     return Json("Task Deleted");
 }
Beispiel #2
0
 public void DeleteTask(MyTasksIdEntryModel entryModel)
 {
     var task = _dataContext.Tasks.FindSingle(TaskSpecs.GetTaskById(entryModel.Id));
     _dataContext.Tasks.Delete(task);
 }