We are converting our data class library from .Net Framework to .Net Standard 2.0 so we can continue to use it in our old Framework projects but also utilize it in our new .Net Core projects.
Things are generally working well, but it does not use the Lazy Loading on which we depended in the Framework project, e.g. when I load an EmployeeIndexItem with an IndexItem, it does not get the Index Item:
[Table( "EmployeeIndexItem", Schema = "Core" )]
public class EmployeeIndexItem
{
public Guid EmployeeIndexItemId { get; set; } = Guid.NewGuid();
public int EmployeeId { get; set; }
public Guid IndexItemId { get; set; }
public virtual IndexItem IndexItem { get; set; }
}
I have found the EntityFrameworkCore.Proxies documentation, but "Package Microsoft.EntityFrameworkCore.Proxies 6.0.4 is not compatible with netstandard2.0"
Is there a way to get the Lazy Loading to work in NetStandard? Or should I bite the bullet and do the necessary Includes?