Specification
Result
Our great sponsors
Specification | Result | |
---|---|---|
6 | 4 | |
1,799 | 746 | |
- | - | |
6.7 | 7.3 | |
about 1 month ago | 17 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.
Result
-
Advantages and disadvantages of FastEndpoints
Using the Nuget Package Ardalis.Result for mapping result objects to HTTP Response Codes and associated objects; FastEndpoint has its own way of approaching this problem, which seems to be to hang everything off an "Endpoint" and optionally using Swagger to redundantly describe the route's behavior; this seems like a step backwards from more advanced Web frameworks in other languages. The advantage of Ardalis.Result should be clear - each closed form of Ardalis.Result can have its own knowledge of what it does, and therefore automatically describe the abstract transformations it does on a request. In functional programming, this "abstract transformation" is typically called a monad transformer or Arrow. Once you have a type that describes the abstract transformation, plugging that into Swagger should be straight-forward.
-
Why doesn't eager loading work with EF?
You could also use the Ardalis Guard Clause, Ardalis Result and Fluent Validation
-
The Operation Result Pattern
I use this generic package. https://github.com/ardalis/Result
-
Best practices for return values to handle success and failure conditions of business rules, exceptions, and returning a result?
For you're Result.cs , look at [Result pattern]https://github.com/ardalis/Result) as an example.
What are some alternatives?
did-core - W3C Decentralized Identifier Specification v1.0
FluentResults - A generalised Result object implementation for .NET/C#
data-interoperability-panel - Repository for the Solid Data Interoperability Panel
clean-minimal-api - A project showcasing how you can build a clean Minimal API using FastEndpoints
spec - Open Application Model (OAM).
SmartEnum - A base class for quickly and easily creating strongly typed enum replacements in C#.
CleanArchitecture - Clean Architecture Solution Template: A starting point for Clean Architecture with ASP.NET Core
Swashbuckle.AspNetCore - Swagger tools for documenting API's built on ASP.NET Core
examQuestionCore - Randomly distribute exam questions - server component written in C#/.NET5
software-design-patterns - C# Design Patterns Tutorial Sample Code
realworlddotnet
safe-routing - A C# source generator for ASP.NET Core razor pages and MVC controllers which produces strongly-typed identifiers for routes.