public CompleteResponse Complete(int id) { var repo = new TaskRepository(); repo.Complete(id); var response = new CompleteResponse(); response.success = id == 2; if (response.success) { response.message = "Everything worked"; } else { response.message = "There was an error"; } return(response); }
public void CompleteTask(int id) { _taskRepo.Complete(id); }