ARTICLE AD BOX
I've got a C# class in a Minimal API, which gets returned. The class looks like this:
public class APIResponse { public APIResponse() { ErrorMessages = new List<string>(); Result = new object(); } public bool IsSuccess { get; set; } public object Result { get; set; } public HttpStatusCode StatusCode { get; set; } public List<string> ErrorMessages { get; set; } }I'm using the Result as an object, to return different data types depending upon what the query returns. It's worked fine for integers, etc. But when I try to assign a bool to it, then in causes all sorts of problems in the C# Blazor app. It complains that an object cannot be converted to a ValueKind.
I'm assigning a bool to Result. Where is that becoming a ValueKind?
All the solutions I've found, when I try them, still result in an error
object cannot be converted to ValueKind
How do I assign a bool to Result in the Minimal API, and get a bool out in the Blazor app that calls that endpoint?
