public async Task ChangeStatus([FromBody] ToDo edit) { var update = Builders <ToDo> .Update.Set(x => x.Done, edit.Done); await todo.UpdateOneAsync(x => x.Id == edit.Id, update); }
public ActionResult Index() { var model = new ToDo(); return(View(model)); }
public async Task Create([FromBody] ToDo newTodo) { await todo.InsertOneAsync(newTodo); }
public ActionResult AJAXCreate([Bind(Include = "Id,Description")] ToDo toDo) { var emptyList = new List <ToDo>(); return(PartialView("_ToDoTable", emptyList)); }