Esempio n. 1
0
 public IActionResult CompleteTodo(CompleteTodoPostModel postModel)
 {
     if (ModelState.IsValid)
     {
         _cmdHandler.Handle(new CompleteTodo(postModel.TodoId, DateTimeOffset.UtcNow));
     }
     return(PartialView("_TodoListPartial", todoListPartialViewModel()));
 }
 public IActionResult CompleteTodo(CompleteTodoPostModel postModel)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest());
     }
     _cmdHandler.Handle(new CompleteTodo(postModel.TodoId, DateTimeOffset.UtcNow));
     return(Ok());
 }