boutique replica bags up ideas

the best replique rolex and prices here.

julia highlight 99j hair color 10a quality straight human hair lace front wigs 8 - 24 inches pre plucked hairline 13x4 inches lace front brazilian wig onlinefor sale

How to stop self-referencing loop in .Net Core Web API? [Fixed]

Updated on     Kisan Patel

Problem:

I am using Entity Framework and having a problem with getting parent and child data that causes self-referencing loop. How to stop self-referencing loop in .Net Core Web API?

Solution:

If you are using ASP.NET Core, you can configure Json.NET to ignore cycles that it finds in the object graph. This is done in the ConfigureServices(...) method in Startup.cs.

public void ConfigureServices(IServiceCollection services) 
{
    ....
    services.AddMvc()                    
                    .AddJsonOptions(
                        options => options.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore
                    )
                    .SetCompatibilityVersion(CompatibilityVersion.Version_2_1);

}

.NET Core

Leave a Reply