Exemplo n.º 1
0
 public ActionResult Delete(int id)
 {
     try
     {
         thirdPartyService.DeleteThirdParty(id);
         return(StatusCode(200));
     }
     catch (Exception ex)
     {
         var sb = new StringBuilder();
         sb.AppendLine($"Error message:{ex.Message}");
         sb.AppendLine($"Error stack trace:{ex.StackTrace}");
         logger.LogError(sb.ToString());
         return(StatusCode(400));
     }
 }