Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mustaddon/linqstring
IQueryable.Select by property names (EF compatible extensions)
https://github.com/mustaddon/linqstring
dotnet dynamic-expressions dynamic-types efcore entity-framework entity-framework-core ienumerable-extensions iqueryable-extensions linq-expressions linq-extensions
Last synced: 3 days ago
JSON representation
IQueryable.Select by property names (EF compatible extensions)
- Host: GitHub
- URL: https://github.com/mustaddon/linqstring
- Owner: mustaddon
- License: mit
- Created: 2023-12-29T11:20:04.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-16T12:06:11.000Z (about 2 months ago)
- Last Synced: 2024-12-16T20:53:57.261Z (18 days ago)
- Topics: dotnet, dynamic-expressions, dynamic-types, efcore, entity-framework, entity-framework-core, ienumerable-extensions, iqueryable-extensions, linq-expressions, linq-extensions
- Language: C#
- Homepage:
- Size: 95.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LinqString [![NuGet version](https://badge.fury.io/nu/LinqString.svg?v110)](http://badge.fury.io/nu/LinqString)
IQueryable.Select by property names (EF compatible extensions)```C#
using LinqString;var result = queryableSource
.OrderBy("SubObj.Prop1", ">Prop2")
.Select("Prop1", "Prop2", "SubObj.Prop1")
.ToList();// is an analogue of
var analogue = queryableSource
.OrderBy(x => x.SubObj.Prop1)
.ThenByDescending(x => x.Prop2)
.Select(x => new {
x.Prop1,
x.Prop2,
SubObj = new {
x.SubObj.Prop1
},
}).ToList();
```
[Program.cs](https://github.com/mustaddon/LinqString/tree/main/Examples/Program.cs)