![]() |
VOOZH | about |
dotnet add package EntityFrameworkCore.Projectables.Abstractions --version 6.0.5
NuGet\Install-Package EntityFrameworkCore.Projectables.Abstractions -Version 6.0.5
<PackageReference Include="EntityFrameworkCore.Projectables.Abstractions" Version="6.0.5" />
<PackageVersion Include="EntityFrameworkCore.Projectables.Abstractions" Version="6.0.5" />Directory.Packages.props
<PackageReference Include="EntityFrameworkCore.Projectables.Abstractions" />Project file
paket add EntityFrameworkCore.Projectables.Abstractions --version 6.0.5
#r "nuget: EntityFrameworkCore.Projectables.Abstractions, 6.0.5"
#:package EntityFrameworkCore.Projectables.Abstractions@6.0.5
#addin nuget:?package=EntityFrameworkCore.Projectables.Abstractions&version=6.0.5Install as a Cake Addin
#tool nuget:?package=EntityFrameworkCore.Projectables.Abstractions&version=6.0.5Install as a Cake Tool
Flexible projection magic for EF Core
👁 NuGet version (EntityFrameworkCore.Projectables)
👁 .NET
Starting with V2 of this project we're binding against EF Core 6. If you're targeting EF Core 5 or EF Core 3.1 then you can use the latest v1 release. These are functionally equivalent.
dbContextOptions.UseProjectables()[Projectable].class Order
{
public decimal TaxRate { get; set; }
public ICollection<OrderItem> Items { get; set; }
[Projectable] public decimal Subtotal => Items.Sum(item => item.Product.ListPrice * item.Quantity);
[Projectable] public decimal Tax => Subtotal * TaxRate;
[Projectable] public decimal GrandTotal => Subtotal + Tax;
}
public static class UserExtensions
{
[Projectable]
public static Order GetMostRecentOrder(this User user) =>
user.Orders.OrderByDescending(x => x.CreatedDate).FirstOrDefault();
}
var result = dbContext.Users
.Where(u => u.UserName == "Jon")
.Select(u => new { u.GetMostRecentOrder().GrandTotal })
.FirstOrDefault();
The properties are inlined into SQL — no client-side evaluation, no N+1.
There are two components: a Roslyn source generator that emits companion Expression<TDelegate> trees for each [Projectable] member at compile time, and a runtime interceptor that walks your LINQ queries and substitutes those expressions before EF Core translates them to SQL.
| Feature | Docs |
|---|---|
| Properties & methods | Guide → |
| Extension methods | Guide → |
| Constructor projections | Guide → |
| Method overloads | Fully supported |
Pattern matching (switch, is) |
Reference → |
| Block-bodied members (experimental) | Advanced → |
| Null-conditional rewriting | Reference → |
| Enum method expansion | Reference → |
UseMemberBody |
Reference → |
| Roslyn analyzers & code fixes (EFP0001–EFP0012) | Reference → |
| Limited/Full compatibility mode | Reference → |
No. The interceptor hooks into EF Core's query compilation pipeline before any provider-specific translation, so it works with SQL Server, PostgreSQL, SQLite, Cosmos DB, and any other EF Core provider.
Two compatibility modes are available: Full (default) expands every query before handing it to EF Core; Limited expands once and caches the result. Limited mode often outperforms plain EF Core on repeated queries. See the Compatibility Mode docs.
Yes — a [Projectable] member can call other [Projectable] members. They are recursively inlined into the final SQL.
Expressionify has overlapping features and a similar approach but a narrower scope. Projectables adds constructor projections, pattern matching, block-bodied members, enum expansion, and a richer diagnostics layer.
LinqKit and similar libraries predate source generators. Projectables (and Expressionify) are superior approaches for modern .NET because the source generator does the heavy lifting at compile time with no runtime reflection.
net8.0 and net10.0)| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on EntityFrameworkCore.Projectables.Abstractions:
| Package | Downloads |
|---|---|
|
EntityFrameworkCore.Projectables
Project over properties and functions in your linq queries |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.0.5 | 34,043 | 5/16/2026 |
| 6.0.4 | 16,495 | 4/30/2026 |
| 6.0.3 | 7,842 | 4/28/2026 |
| 6.0.2 | 41,936 | 4/2/2026 |
| 6.0.1 | 3,834 | 3/27/2026 |
| 6.0.0 | 1,489 | 3/26/2026 |
| 5.0.2 | 59,250 | 2/13/2026 |
| 5.0.1 | 39,697 | 1/15/2026 |
| 4.1.0-preview.1 | 3,039 | 8/13/2025 |
| 4.0.0 | 932,467 | 12/7/2024 |
| 4.0.0-preview.4 | 68,680 | 8/18/2024 |
| 3.0.4 | 1,016,492 | 8/30/2023 |
| 3.0.3 | 159,198 | 5/4/2023 |
| 3.0.2 | 133,511 | 3/16/2023 |
| 3.0.1 | 1,337 | 3/9/2023 |
| 3.0.0 | 3,800 | 3/2/2023 |
| 3.0.0-beta.1 | 9,265 | 10/13/2022 |