public PmsResponseDto AddReward([FromBody] AddRewardRequestDto request) { if (request == null || request.Reward == null) { throw new PmsException("Reward can not be added."); } var response = new PmsResponseDto(); var Id = _iPmsLogic.AddReward(request.Reward); if (Id > 0) { response.ResponseStatus = PmsApiStatus.Success.ToString(); response.StatusDescription = "Reward Added successfully."; response.ResponseObject = Id; } else { response.ResponseStatus = PmsApiStatus.Failure.ToString(); response.StatusDescription = "Reward Addition failed.Contact administrator."; } return(response); }