public async Task <ActionResult <Todo> > PutAsync(string id, Todo todo)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != todo.Id)
            {
                return(BadRequest());
            }

            bool updateResult = await todosService.Update(id, todo);

            if (!updateResult)
            {
                return(NotFound());
            }

            return(Ok(new { todo }));
        }