コード例 #1
0
        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);
        }
コード例 #2
0
 public void CompleteTask(int id)
 {
     _taskRepo.Complete(id);
 }