Get a Value from ActionResult in a ASP.Net Core API Method
If you’re sure that it is a type of OkObjectResult then cast before using it like below: var result3 = (OkObjectResult)result.Result; // <– Cast is before using it. var result4 = result3.Value; //<– Then you’ll get no error here.