I have a class which I return as per request
public class OutputModel { public string Id { get; set; } public int Status{ get; set; } public int Error{ get; set; } }
I want to return the Error property only in specific cases, else the user will get only the Id and Status.
is this possible?