Description
Lightweight optimizer of System.Linq.Expression expressions. Just basic boolean algebra and reductions, constant and tuple/anonymous type eliminations. For side-effect free Expressions. No compilation-subjective optimizations. This is meant to be used with expressions that are not compiled but transferred to other domain.
Linq.Expression.Optimizer alternatives and similar packages
Based on the "ORM" category.
Alternatively, view Linq.Expression.Optimizer alternatives based on common mentions on social networks and blogs.
-
TypeORM
ORM for TypeScript and JavaScript. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms. -
Dapper
DISCONTINUED. Dapper - a simple object mapper for .Net [Moved to: https://github.com/DapperLib/Dapper] -
Entity Framework
EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations. -
SqlSugar
.Net aot ORM Fastest ORM Simple Easy Sqlite orm Oracle ORM Mysql Orm postgresql ORm SqlServer oRm 达梦 ORM 人大金仓 ORM 神通ORM C# ORM , C# ORM .NET ORM NET5 ORM .NET6 ORM ClickHouse orm QuestDb ,TDengine ORM,OceanBase orm,GaussDB orm ,Tidb orm Object/Relational Mapping -
FreeSql
🦄 .NET aot orm, C# orm, VB.NET orm, Mysql orm, Postgresql orm, SqlServer orm, Oracle orm, Sqlite orm, Firebird orm, 达梦 orm, 人大金仓 orm, 神通 orm, 翰高 orm, 南大通用 orm, 虚谷 orm, 国产 orm, Clickhouse orm, QuestDB orm, MsAccess orm. -
EFCore.BulkExtensions
Entity Framework EF Core efcore Bulk Batch Extensions with BulkCopy in .Net for Insert Update Delete Read (CRUD), Truncate and SaveChanges operations on SQL Server, PostgreSQL, MySQL, SQLite -
Dapper Extensions
Dapper Extensions is a small library that complements Dapper by adding basic CRUD operations (Get, Insert, Update, Delete) for your POCOs. For more advanced querying scenarios, Dapper Extensions provides a predicate system. The goal of this library is to keep your POCOs pure by not requiring any attributes or base class inheritance. -
Entity Framework 6
This is the codebase for Entity Framework 6 (previously maintained at https://entityframework.codeplex.com). Entity Framework Core is maintained at https://github.com/dotnet/efcore. -
SmartSql
SmartSql = MyBatis in C# + .NET Core+ Cache(Memory | Redis) + R/W Splitting + PropertyChangedTrack +Dynamic Repository + InvokeSync + Diagnostics -
NPoco
Simple microORM that maps the results of a query onto a POCO object. Project based on Schotime's branch of PetaPoco -
SQLProvider
A general F# SQL database erasing type provider, supporting LINQ queries, schema exploration, individuals, CRUD operations and much more besides. -
MongoDB Repository pattern implementation
DISCONTINUED. Repository abstraction layer on top of Official MongoDB C# driver -
MongoDB.Entities
A data access library for MongoDB with an elegant api, LINQ support and built-in entity relationship management -
DbExtensions
Data-access framework with a strong focus on query composition, granularity and code aesthetics. -
NReco.Data
Fast DB-independent DAL for .NET Core: abstract queries, SQL commands builder, schema-less data access, POCO mapping (micro-ORM). -
EntityFrameworkCore.SqlServer.SimpleBulks
Very simple .net library that supports bulk insert (retain client populated Ids or return db generated Ids), bulk update, bulk delete and bulk merge operations. Lambda Expression is supported. -
EntityFramework.DatabaseMigrator
EntityFramework.DatabaseMigrator is a WinForms utility to help manage Entity Framework 6.0+ migrations.
WorkOS - The modern identity platform for B2B SaaS
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Linq.Expression.Optimizer or a related project?
README
Linq.Expression.Optimizer
Lightweight optimizer of System.Linq.Expression expressions. Just basic boolean algebra and reductions, constant and tuple/anonymous type eliminations. For side-effect free Expressions. No compilation-subjective optimizations. This is meant to be used with expressions that are not compiled but transferred to other domain.
Supported frameworks: Net 3.5, Net 4.5-... (and Mono), .NET Standard 1.6 (so also .NET Core)
Supported optimizations
Example as a quote. There are various other cases also.
- Replace constants comparisons:
3 < 4 -> true
- Remove anonymous types:
new AnonymousObject(Item1 = x, Item2 = "").Item1 --> x
- Cut not used condition:
if false then x else y -> y
- Remove not:
not(false) -> true
- Binary tree balancing:
a or (b or (c or (d or (e or (f or (g or h)))))) -> ((a or b) or (c or d)) or ((e or f) or (g or h))
- Captured closure constant ("free variable") evaluation:
y = 3 and (y + x) -> (3 + x)
- Execute simple math:
5 * 3 -> 15
- Boolean algebra reductions:
- gather
(x or y) and (x or z) -> x or (y and z)
- identity
false or y -> y
- annihilate
true or x -> true
- absorb
x and (x or y) -> x
- idempotence
y or y -> y
- complement
x and not(x) -> false
- doubleNegation
not(not(y)) -> y
- deMorgan
not(x) and not(y) -> not(x or y)
- gather
Background
This is a side-track from SQLProvider, excelent tool that is kind of OR-mapper with auto-generated objects, so it compiles any databases to .NET-language, and works fast on design time in Visual Studio or other editors.
But I needed better SQL-queries. So this optimses .NET LINQ-expressions. These expressions were not ment to be compiled so Nessos LinqOptimizer was not the right tool. I thought that .NET would optimize these automatically, but no.
Read the Getting started tutorial to learn more.
Documentation: http://thorium.github.io/Linq.Expression.Optimizer
Maintainer(s)
If you want more optimizations, please feel free to send PRs!