/// <summary> /// /// </summary> /// <param name="context"></param> /// <param name="personId"></param> /// <returns></returns> public ApiResponse <bool> DeleteIdentifier(TestProjectDbContext context, Guid personId) { try { _repository.DeleteIdentifier(context, personId); return(ApiResponse <bool> .SuccessResult(true)); } catch (Exception ex) when(ex is FailException || ex is ValidationException || ex is ArgumentException) { return(ApiResponse <bool> .ErrorResult(message : ex.Message, statusCode : HttpStatusCode.BadRequest)); } catch (Exception ex) when(ex is ErrorException) { //LoggingManager.Error(ex.ToString()); return(ApiResponse <bool> .ErrorResult(message : ex.Message)); } catch (Exception ex) { //LoggingManager.Error(ex.ToString()); return(ApiResponse <bool> .ErrorResult(message : ex.Message)); } }