Exemplo n.º 1
0
 public IActionResult Delete(string id)
 {
     try
     {
         var item = _credentialsRepository.Find(id);
         if (item == null)
         {
             return(NotFound(ErrorCode.RecordNotFound.ToString()));
         }
         _credentialsRepository.Delete(id);
     }
     catch (Exception)
     {
         return(BadRequest(ErrorCode.CouldNotDeleteItem.ToString()));
     }
     return(NoContent());
 }