Specification
GuardClauses
Our great sponsors
Specification | GuardClauses | |
---|---|---|
6 | 8 | |
1,799 | 2,906 | |
- | - | |
6.7 | 8.0 | |
about 1 month ago | 10 days 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.
Specification
-
Why doesn't eager loading work with EF?
If so, then look into this
-
What is the point of using repository pattern with entity framework
Also, to minimize duplication of code and optimize your architecture i suggest using something like https://github.com/ardalis/Specification
-
Linq with an expression not returning an IAsyncEnumerable
This is a great candidate project for the Ardalis.Specifications library.
-
Confused on how to structure my API with Entity Framework
This is honestly such an amazing way to make sure you have a clear view of what your Linq does, see https://github.com/ardalis/Specification - note that the examples on the front git page uses a repository, but he later allowed the use directly on DbSet which finally made it possible for me to use the library.
-
How do you handle querying large object graphs with EF Core (and other questions)?
Check out the specification pattern - it is designed to encapsulate query logic similar to your example. Steve Smith has a nice library for it on GitHub: https://github.com/ardalis/Specification
-
Using Dapper and EF Core in the same project. Is it a bad practice? Is there any uniform way to abstract them?
I'm thinking that the only way to abstract both of them would be to have the repositories return IEnumerables and have well defined aggregates for the entire application to avoid an exploding number of methods on the interface, but this is not possible in my project*. I've looked at Steve Smith's Specification library, but since it works with IQueryable, it would not work with Dapper.
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?
did-core - W3C Decentralized Identifier Specification v1.0
CleanArchitecture - Clean Architecture Solution Template: A starting point for Clean Architecture with ASP.NET Core
data-interoperability-panel - Repository for the Solid Data Interoperability Panel
blazor-starter-kit - Clean Architecture Template for Blazor WebAssembly Built with MudBlazor Components.
spec - Open Application Model (OAM).
modular-monolith-with-ddd - Full Modular Monolith application with Domain-Driven Design approach.
CH.CleanArchitecture - My personal take on Clean Architecture (.NET8)
Result - A result abstraction that can be mapped to HTTP response codes if needed.
CleanArchitecture - Clean Architecture Solution Template for ASP.NET Core
examQuestionCore - Randomly distribute exam questions - server component written in C#/.NET5
JHipster.NET - JHipster.NET blueprint