public JsonResult AddOrUpdate(int?id, TodoDto model) { if (ModelState.IsValid) { _todoService.AddOrSet(id, model); } return(Json(new Result { Success = true })); }