Mid EF Core

How to avoid cyclic references / circular navigation properties?

  • Use [JsonIgnore] or ReferenceLoopHandling.Ignore in JSON serialization.
  • Use DTOs without circular refs for API responses.
  • Carefully design navigation properties to avoid cycles or use explicit loading.

More from Entity Framework Core Tutorial

All questions for this course