} // IsExistById

/*
 *      public IsExistByGuidResponse IsExistByGuid(IsExistByGuidRequest request)
 *      {
 *
 *          IsExistByGuidResponse response = new IsExistByGuidResponse();
 *
 *          try
 *          {
 *
 *              if (new AuthenticationRequestCap().IsExistByGuid(request.Guid))
 *                  response.Result = new Ac4yProcessResult() { Code = Ac4yProcessResult.SUCCESS };
 *              else
 *                  response.Result = new Ac4yProcessResult() { Code = Ac4yProcessResult.INEFFECTIVE };
 *
 *          }
 *          catch (Exception exception)
 *          {
 *              response.Result = (new Ac4yProcessResult() { Code = Ac4yProcessResult.FAIL, Message = exception.Message, Description = exception.StackTrace });
 *          }
 *
 *          return response;
 *
 *      } // IsExistByGuid
 */
        public UpdateByIdResponse UpdateById(UpdateByIdRequest request)
        {
            UpdateByIdResponse response = new UpdateByIdResponse();

            try
            {
                if (new AuthenticationRequestCap().IsExistById(request.Id))
                {
                    AuthenticationRequest responseAuthenticationRequest = new AuthenticationRequestCap().UpdateById(request.Id, request.AuthenticationRequest);

                    response.Result = new Ac4yProcessResult()
                    {
                        Code = Ac4yProcessResult.SUCCESS
                    };
                    response.AuthenticationRequest = responseAuthenticationRequest;
                }
                else
                {
                    response.Result = new Ac4yProcessResult()
                    {
                        Code = Ac4yProcessResult.FAIL, Message = "Adott id-val nem létezik rekord."
                    };
                }
            }
            catch (Exception exception)
            {
                response.Result = (new Ac4yProcessResult()
                {
                    Code = Ac4yProcessResult.FAIL, Message = exception.Message, Description = exception.StackTrace
                });
            }

            return(response);
        } // UpdateById
        } // UpdateById

/*
 *      public UpdateByGuidResponse UpdateByGuid(UpdateByGuidRequest request)
 *      {
 *
 *          UpdateByGuidResponse response = new UpdateByGuidResponse();
 *
 *          try
 *          {
 *              if (new AuthenticationRequestCap().IsExistByGuid(request.Guid)) {
 *
 *                  new AuthenticationRequestCap().UpdateByGuid(request.Guid, request.AuthenticationRequest);
 *
 *                  response.Result = new Ac4yProcessResult() { Code = Ac4yProcessResult.SUCCESS };
 *              }
 *              else
 *              {
 *                  response.Result = new Ac4yProcessResult() { Code = Ac4yProcessResult.FAIL, Message = "Adott id-val nem létezik rekord." };
 *              }
 *
 *          }
 *          catch (Exception exception)
 *          {
 *              response.Result = (new Ac4yProcessResult() { Code = Ac4yProcessResult.FAIL, Message = exception.Message, Description = exception.StackTrace });
 *          }
 *
 *          return response;
 *
 *      } // UpdateByGuid
 */
        public InsertResponse Insert(InsertRequest request)
        {
            InsertResponse response = new InsertResponse();

            try
            {
                AuthenticationRequest responseAuthenticationRequest = new AuthenticationRequestCap().Insert(request.AuthenticationRequest);

                response.Result = new Ac4yProcessResult()
                {
                    Code = Ac4yProcessResult.SUCCESS
                };
                response.AuthenticationRequest = responseAuthenticationRequest;
            }
            catch (Exception exception)
            {
                response.Result = (new Ac4yProcessResult()
                {
                    Code = Ac4yProcessResult.FAIL, Message = exception.Message, Description = exception.StackTrace
                });
            }

            return(response);
        } // Insert