My model is effectively:
public class Project
{
[Key]
public Guid ProjectId { get; set; }
public Guid ClientId { get; set; }
public virtual Client Client { get; set; }
}
public class Client
{
[Key]
public Guid ClientId { get; set; }
public virtual ICollection<Project> Projects { get; set; } = new List<Project>();
}
Up until I changed to the EntityFrameworkCore, I could fetch Projects with their associated Clients:
DbContext.Projects.Include(p => p.Client);
Since upgrading, I'm getting the error:
Additional information: Self referencing loop detected with type 'Models.Project'. Path 'Client.Projects'.
This should be pretty straight-forward: give me the Projects and their Clients. I don't want the Clients' Projects - else then I could see the issue with the loop.
I've mentioned this here:
aspnet/Mvc#4160
My model is effectively:
Up until I changed to the EntityFrameworkCore, I could fetch Projects with their associated Clients:
DbContext.Projects.Include(p => p.Client);Since upgrading, I'm getting the error:
Additional information: Self referencing loop detected with type 'Models.Project'. Path 'Client.Projects'.
This should be pretty straight-forward: give me the Projects and their Clients. I don't want the Clients' Projects - else then I could see the issue with the loop.
I've mentioned this here:
aspnet/Mvc#4160