public PmsResponseDto AddUser([FromBody] UserRequestDto request) { if (request == null || request.User == null) { throw new PmsException("User can not be added."); } var response = new PmsResponseDto(); var Id = _iPmsLogic.AddUser(request.User); if (Id > 0) { response.ResponseStatus = PmsApiStatus.Success.ToString(); response.StatusDescription = "Record saved successfully."; response.ResponseObject = Id; } else { response.ResponseStatus = PmsApiStatus.Failure.ToString(); response.StatusDescription = "Operation failed.Please contact administrator."; } return(response); }