.Net Core 3.0 possible object cycle was detected which is not supported

前端 未结 8 1713
我寻月下人不归
我寻月下人不归 2020-12-02 09:27

I have 2 entities that are related as one to many

public class Restaurant {
   public int RestaurantId {get;set;}
   public string Name {get;set;}
   public          


        
8条回答
  •  忘掉有多难
    2020-12-02 10:07

    I came across this issue and I was confused because I have another application running the same code, only difference was I wanted to use await this time, and in the last application I used ConfigureAwait(false).GetAwaiter().GetResult();

    So by removing await and adding ConfigureAwait(false).GetAwaiter().GetResult() at the end of the Async method I was able to resolve this.

提交回复
热议问题