LINQKit
GuardClauses
Our great sponsors
LINQKit | GuardClauses | |
---|---|---|
6 | 8 | |
1,563 | 2,903 | |
- | - | |
3.5 | 8.0 | |
3 months ago | about 1 month ago | |
C# | C# | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
LINQKit
-
What your hidden nuget gems ?
I also enjoy LinqKit (mentioned here). Really cool way to build a LINQ predicate.
-
EF Core Include where
I would suggest to install LINQKit Configure DbContextOptions: cs builder .UseSqlServer(connectionString) .WithExpressionExpanding(); // enabling LINQKit extension
- Як я мігрував з EF 6 до EF Core 5
-
Build dynamic Linq filters (aka. where() predicates)
Nice! At work we do something similar, but we use the predicate builder of linqkit: https://github.com/scottksmith95/LINQKit
-
Expression<Func<T>> usage in filters and sorting
To answer your other question, you can use something like PredicateBuilder to compose predicates for use in Where and OrderBy methods. To define your OrderBy with a boolean (or string or enum) to denote the ordering, you would have to make an extension method like so:
GuardClauses
-
Why doesn't eager loading work with EF?
You could also use the Ardalis Guard Clause, Ardalis Result and Fluent Validation
-
3 things to avoid when implementing Domain-Driven Design (DDD)
Here is an example how one would make sure our order total is valid. For this purpose I use an amazing library called GuardClauses.
- What your hidden nuget gems ?
-
Implementing a Clean Architecture in ASP.NET Core 6
GuardClauses
-
Announcing .NET Community Toolkit v8.0.0 Preview 1
I'm guessing it's just a port of Ardalis' Guard class since he helped a lot with Microsoft's web projects.
-
How can I avoid IEnumerable multiple iterations? Is it bad to cast IEnumerable --> ICollection --> IEnumerable to perform validation?
The Guard Clauses are from: https://github.com/ardalis/GuardClauses
-
When to explicitly throw ArgumentNullException?
In terms of readability concerns, I definitely hear you on that. Using something like this can cut down on code bloat that comes with param validation and help with readability.
-
What a good Starter Kit for WebAPI for Asp.NET Core
It's made by Ardalis, who wrote Microsoft's architectural guide for ASP.NET Core Web APIs. I like his GuardClauses library too.
What are some alternatives?
Linq.Expression.Optimizer - System.Linq.Expression expressions optimizer. http://thorium.github.io/Linq.Expression.Optimizer
CleanArchitecture - Clean Architecture Solution Template: A starting point for Clean Architecture with ASP.NET Core
dynamic-linq-query-builder - A truly generic and dynamic linq query builder to compliment jQuery QueryBuilder and other dynamic linq query generation needs
blazor-starter-kit - Clean Architecture Template for Blazor WebAssembly Built with MudBlazor Components.
System.Linq.Dynamic.Core - The .NET Standard / .NET Core version from the System Linq Dynamic functionality.
modular-monolith-with-ddd - Full Modular Monolith application with Domain-Driven Design approach.
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.
CH.CleanArchitecture - My personal take on Clean Architecture (.NET8)
MongoDB Repository pattern implementation
CleanArchitecture - Clean Architecture Solution Template for ASP.NET Core
LINQ to DB - Linq to database provider.
JHipster.NET - JHipster.NET blueprint