Skip to content

Adds abstraction layer for expressions made of .Include and .ThenInclude methods.

License

Notifications You must be signed in to change notification settings

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  

Abstractions can be installed from NuGet

Install-Package EFCore.IncludeByExpression.Abstractions

Example Usage

using EFCore.IncludeByExpression;
using EFCore.IncludeByExpression.Abstractions;

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

Adds abstraction layer for expressions made of .Include and .ThenInclude methods.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages