Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 4th, 2012  |  syntax: None  |  size: 0.37 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How did I solve the Json serializing circular reference error?
  2. public class MyObjectContext : DbContext, IDbContext
  3. {
  4.      public MyObjectContext(string connectionStringName) : base(connectionStringName)
  5.      {
  6.         ((IObjectContextAdapter)this).ObjectContext.ContextOptions.ProxyCreationEnabled = false;
  7.      }
  8.      public DbSet<Product> Products {get;set;}
  9.      //etc.
  10. }