Ejemplo n.º 1
0
        public IActionResult DeleteContact(ContactIdRequest request)
        {
            if (ModelState.IsValid)
            {
                SingleResponse <int> response = new SingleResponse <int>();
                try
                {
                    _xbService.DeleteContact(request.ContactId);
                    response.ResultCode = ResultCodes.normal;
                }
                catch
                {
                    response.ResultCode = ResultCodes.failed;
                }
                response.Result = 0;

                return(ResponseExtensions.ToHttpResponse(response));
            }
            else
            {
                return(ValidationError.GetValidationErrorResponse(ModelState));
            }
        }