Result
software-design-patterns
Result | software-design-patterns | |
---|---|---|
4 | 1 | |
752 | 95 | |
- | - | |
7.3 | 0.0 | |
23 days ago | about 2 years ago | |
C# | C# | |
MIT License | GNU General Public License v3.0 only |
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.
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.
software-design-patterns
-
The Mediator Pattern
I will not discuss the whole process of setting up the project to use these libraries because the source code is for this example is available. For the purpose of this article we will only discuss the Mediator pattern implementation.
What are some alternatives?
FluentResults - A generalised Result object implementation for .NET/C#
MediatR - Simple, unambitious mediator implementation in .NET
clean-minimal-api - A project showcasing how you can build a clean Minimal API using FastEndpoints
DesignPatternsLibrary - A comprehensive design patterns library implemented in C#, which covers various design patterns from the most commonly used ones to the lesser-known ones. Get familiar with and learn design patterns through moderately realistic examples.
SmartEnum - A base class for quickly and easily creating strongly typed enum replacements in C#.
Specification - Base class with tests for adding specifications to a DDD model
awesome-dotnet-tips - Curated list of awesome tips and tricks, resources, videos and articles in .net, software architecture, microservice and cloud-native
Swashbuckle.AspNetCore - Swagger tools for documenting API's built on ASP.NET Core
AutoMapper - A convention-based object-object mapper in .NET.
safe-routing - A C# source generator for ASP.NET Core razor pages and MVC controllers which produces strongly-typed identifiers for routes.
ApiEndpoints - A project for supporting API Endpoints in ASP.NET Core web applications.