LazyEntityGraph is an open source library for .NET which lets you generate object graphs with circular dependencies, such as those found in ORMs, by lazily generating relationship properties.
Hi,
I'm having a problem with my model, which makes use of one sided navigation properties, which doesn't seem to be supported.
For example;
class Foo
{
public int Id { get; set; }
public int BarId { get; set; }
public virtual Bar Bar { get; set; }
}
class Bar
{
public int Id { get; set; }
}
class Context : DbContext
{
void OnModelCreating(ModelBuilder builder)
{
builder.Entity<Foo>()
.HasOne(f => f.Bar)
.WithMany()
.HasForeignKey(f => f.BarId);
}
}
I have added support for this, if you accept pull requests.
Hi, I'm having a problem with my model, which makes use of one sided navigation properties, which doesn't seem to be supported. For example;
I have added support for this, if you accept pull requests.