As you know, ASP.NET web api (ApiController) automatically gives a JSON response through NewtonSoft.JSON.
My three-level model 1: MANY: 1 EF is requested in several ways, and it works fine by applying the [JsonIgnore] attribute to some virtual properties to avoid a callback problem. (I use the third solution in this (link) )
but my problem is that sometimes I need to use json-ignored properties to query with the model.
Is there a way to control the [JsonIgnore] attribute at runtime? Or is there any method to turn a property on and off that should be ignored in NewtonSoft.JSON at run time?
source share