I am using asp.net core web api. below is my simple post function which is having a single string parameter. The problem is when I use [FromBody] the string stays null. I am using PostMan to test my service. I want raw data to pass from client to my controller.

        public IActionResult Test([FromRoute]decimal businessKey,[FromBody] string body)
            var data = businessKey;
            return new JsonResult("Hello World");

Related posts

Recent Viewed