Skip to content

Hau-Hau/EFCore.IncludeByExpression

Repository files navigation

EFCore.IncludeByExpression

tests Coverage Status

This repository provides a library that allows to build expressions of only .Include and .ThenInclude methods.

Getting started

Install from NuGet

Install-Package EFCore.IncludeByExpression  

Example Usage

using EFCore.IncludeByExpression;

static void Main(string[] args)
{
  var nodes = GetNodes(x => x.Include(y => y.Childs).ThenInclude(y => y.Parent));
}

static IEnumerable<Node> GetNodes(NavigationPropertyPath<Node>? navigationPropertyPath = null)
{
    return DbContext.Nodes.IncludeByExpression(navigationPropertyPath).ToList();
}

About

A thin layer for building expressions from .Include and .ThenInclude methods.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages