public IHttpActionResult GetPercentageRate([FromUri] CreditDto creditDto) { var userId = User.Identity.GetUserId().Value; creditDto.UserId = userId; var result = _creditService.GetCalculatedPercentageRate(creditDto); if (!result.Success) { return(BadRequest(result.Message)); } else { return(Ok(result)); } }