- How did I solve the Json serializing circular reference error?
- public class MyObjectContext : DbContext, IDbContext
- {
- public MyObjectContext(string connectionStringName) : base(connectionStringName)
- {
- ((IObjectContextAdapter)this).ObjectContext.ContextOptions.ProxyCreationEnabled = false;
- }
- public DbSet<Product> Products {get;set;}
- //etc.
- }