public ActionResult Create(Task task)
 {
     Collection.Add(task);
     return Json(task, JsonRequestBehavior.AllowGet);
 }
 public JsonResult Update(Task model)
 {
     var task = Collection.FirstOrDefault(x => x.Id == model.Id);
     Collection.Remove(task);
     Collection.Add(model);
     return Json(model, JsonRequestBehavior.AllowGet);
 }