title: How to ignore navigation properties in asp.net mvc web api
body: <p>I'm using ASP.NET Web API with Entity Framework but i'm facing a problem while generating the JSON for the navigation property:</p>
  
  <p>I have two tables; Product and Category.</p>
  
  <pre><code>    public class Product
          {
              public int ProductID { get; set; }
              public string ProductName { get; set; }
  
              public virtual Category Category { get; set; }
          }
  
  public class Category
      {    
          public int CategoryID { get; set; }
          public string CategoryName { get; set; }
  
          public virtual ICollection&lt;Product&gt; Products { get; set; }
      }
  </code></pre>
  
  <p>when I generate the JSON for Product it generates the JSON category which is fine but inside the Category JSON there is another JSON pointing to JSON product so a huge JSON file is create i tried to solve this issue by removing virtual but every time i update the model i face the same problem. is there any way to solve?</p>