After installing StructureMap.MVC5 package got next exception System.InvalidOperationException Stack empty. in case when you try to display circular object dependency with partial view.
@model WebApplication.Models.Test
@foreach (var val in Model.Tests) {
@Html.Partial(val.GetType().Name, val)
}
or just
@Html.DisplayFor(model=>model.Tests)
Object example:
public class Test
{
public ICollection<Test> Tests { get; set; }
}
Any thoughts how it is possible to resolve?
Thanks!