zzzprojects/System.Linq.Dynamic.Core
zzzprojects/System.Linq.Dynamic.Core has 1,713 GitHub stars and 246 forks. GitHot measured +1 in 7 days. Last checked 2026-11-10 01:11 UTC. Last push 2026-09-01.
The .NET Standard / .NET Core version from the System Linq Dynamic functionality.
Crecimiento de estrellas medido
- in 24h
- Actualización retrasada
- in 7 days
- +1
- in 15 days
- Actualización retrasada
- in 1 month
- Actualización retrasada
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalSystem.Linq.Dynamic.Core
This is a .NET Core / Standard port of the Microsoft assembly for the .Net 4.0 Dynamic language functionality.
Overview
With this library it's possible to write Dynamic LINQ queries (string based) on an IQueryable:
var query = db.Customers
.Where("City == @0 and Orders.Count >= @1", "London", 10)
.OrderBy("CompanyName")
.Select("new(CompanyName as Name, Phone)");
Interpolated strings are supported on .NET 4.6(and above), .NET Core 2.1(and above), .NET Standard 1.3(and above) and UAP 10.0(and above). For example:
string cityName = "London";
int c = 10;
db.Customers.WhereInterpolated($"City == {cityName} and Orders.Count >= {c}");
Sponsors
ZZZ Projects owns and maintains System.Linq.Dynamic.Core as part of our mission to add value to the .NET community
Through Entity Framework Extensions and Dapper Plus, we actively sponsor and help key open-source libraries grow.
:exclamation: Breaking changes
v1.3.0
A breaking change is introduced in this version which is related to calling methods on classes.
Due to security reasons, it's now only allowed to call methods on the standard predefined classes like (bool, int, string ...).
If you want to call a method on an own custom class, annotate that class with the DynamicLinqType.
Example:
[DynamicLinqType]
public class MyCustomClass
{
public int GetAge(int x) => x;
}
If it's not possible to add that attribute, you need to implement a custom CustomTypeProvider and set this to the ParsingConfig and provide that config to all dynamic calls.
Or provide a list of additional types in the DefaultDynamicLinqCustomTypeProvider.cs.
v1.6.0
Change 1
It's not allowed anymore to call any methods on the object type. By default also the ToString and Equals methods are not allowed.
This is done to mitigate the risk of calling methods on the object type which could lead to security issues (CVE-2024-51417).
To allow these methods set AllowEqualsAndToStringMethodsOnObject to true in the ParsingConfig and provide that config to all dynamic calls.
Change 2
By default the RestrictOrderByToPropertyOrField is now set to true in the ParsingConfig.
Which means that only properties and fields can be used in the OrderBy / ThenBy.
This is done to mitigate the risk of calling methods or other expressions in the OrderBy / ThenBy which could lead to security issues.
To allow these methods set RestrictOrderByToPropertyOrField to false in the ParsingConfig and provide that config to all dynamic calls.
Change 3
The DefaultDynamicLinqCustomTypeProvider has been changed to only return types which have the [DynamicLinqType] attribute applied.
If it's not possible to add that attribute, you need to implement a custom CustomTypeProvider and set this to the ParsingConfig and provide that config to all dynamic calls.
Or provide a list of additional types in the DefaultDynamicLinqCustomTypeProvider.cs.
Useful links
Info
Development Details
Frameworks
The following frameworks are supported:
- net35, net40, net45, net46 and up
- netstandard1.3, netstandard2.0 and netstandard2.1
- netcoreapp3.1, net5.0, net6.0, net7.0, net8.0 and net9.0
- uap10.0
Fork details
This fork takes the basic library to a new level. Also adds unit tests to help ensure that it works properly.
Some background:
I forked from https://github.com/NArnott/System.Linq.Dynamic and added some more functionality there.
My fork is still visible on github [https://github.com/StefH/System.Linq.Dynamic], however I decided to start a new project + NuGet to avoid confusion and create the project according to the new VS2017 + .NET Core rules / standards.
However, currently there are multiple nuget packages and projects available:
| Project | NuGet | Author | Comment |
|---|---|---|---|
| kahanu/System.Linq.Dynamic | System.Linq.Dynamic | @kahanu | - |
| kavun/System.Linq.Dynamic.3.5 | System.Linq.Dynamic.3.5/ | @kavun | only 3.5 and VB.NET |
| NArnott/System.Linq.Dynamic | System.Linq.Dynamic.Library | @NArnott | removed from github + nuget ? |
| dynamiclinq.codeplex | - | dialectsoftware | - |
| dynamic-linq | - | scottgu | - |
Contribute
The best way to contribute is by spreading the word about the library:
- Blog it
- Comment it
- Star it
- Share it
A HUGE THANKS for your help.
More Projects
- Projects:
- Learn Websites
- Online Tools:
- and much more!
To view all our free and paid projects, visit our website ZZZ Projects.
Explorar proyectos relacionados
Asabeneh/30-Days-Of-Python
El reto de programación 30 Days of Python es una guía paso a paso para aprender el lenguaje de programación Python en 30 días. Este reto puede llevar más de 100 días. Sigue tu propio ritmo. Estos vídeos también pueden ayudarte: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,560 estrellasgrafana/grafana
Plataforma abierta y componible de observabilidad y visualización de datos. Visualiza métricas, registros y trazas de múltiples fuentes, como Prometheus, Loki, Elasticsearch, InfluxDB, Postgres y muchas más.
77,830 estrellasredis/redis
Para los desarrolladores que crean aplicaciones en tiempo real basadas en datos, Redis es la opción preferida, la más rápida y la de más funciones como caché, servidor de estructuras de datos y motor de consultas de documentos y vectores.
77,395 estrellasapache/superset
Apache Superset es una plataforma de visualización y exploración de datos.
75,473 estrellas
