Пример #1
0
 public IActionResult ViewRecord(int id)
 {
     try
     {
         return(Ok(_getResidentByIdUseCase.Execute(id)));
     }
     catch (ResidentNotFoundException)
     {
         return(NotFound("No record could be found for the provided ID"));
     }
 }
Пример #2
0
 public IActionResult ViewRecord(string houseReference, int personReference)
 {
     try
     {
         var record = _getResidentByIdUseCase.Execute(houseReference, personReference);
         return(Ok(record));
     }
     catch (ResidentNotFoundException)
     {
         return(NotFound());
     }
 }