CSharpFunctionalExtensions
Middleware
CSharpFunctionalExtensions | Middleware | |
---|---|---|
13 | 5 | |
2,245 | 784 | |
- | - | |
6.4 | 3.2 | |
6 days ago | 8 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.
CSharpFunctionalExtensions
-
Result pattern: language-ext vs FunctionalExtensions?
Hey, I am considering adopting the Result pattern in my codebase. Wanted to get some opinions from someone who has experience with it: should I start with language-ext or FunctionalExtensions?
-
Exception handling between controller and service
I like both of those libraries but my favorite is CSharpFunctionalExtensions.
-
Do you add the “Async” suffix to async method names?
This very popular library CSharpFunctionalExtensions does not add the “Async” suffix because:
- Is it better to return null or a new object?
-
Communication - library for Results
Something that also has types to handle such cases is https://github.com/vkhorikov/CSharpFunctionalExtensions
-
Three words.,, => C# Functional Programming is awesome!!! Do you seasoned developers have any war-stories or nightmare stories regarding Functional Programming?
CSharpFunctionalExtensions Really great, this is all you need
-
MVC: How do you return Failures from Services? (Separation of Concern)
https://github.com/vkhorikov/CSharpFunctionalExtensions is a small library that has a really nice Result type included, which allows implicit converisons.
-
Kentico Xperience Design Patterns: Handling Failures - The Result Monad
If you think your Kentico Xperience site might benefit from returning failures and using the Result monad, checkout the CSharpFunctionalExtensions library and my library-in-progress XperienceCommunity.CQRS. It codifies these patterns for data retrieval and integrates cross-cutting concerns like logging and caching.
- What's a pattern similar to Rust's Option<Option<T>>?
-
Only continue with functions if variable is true
https://github.com/vkhorikov/CSharpFunctionalExtensions - a package with ready types and functions :)
Middleware
- Exception handling between controller and service
- How to log exceptions caught by a global exception handler?
-
NET6 Global error response
Sure, from the example in the repository you should be able to see a pretty solid example of wireup. The `ConfigureProblemDetails` function shows off the defaults but that's your configuration point for any custom handling or mapping.
-
Is it conventional for the controller to throw exceptions and let middleware handle the response?
I highly recommend this nuget package, it simplified every api I've ever worked on. https://github.com/khellang/Middleware
What are some alternatives?
language-ext - C# functional language extensions - a base class library for functional programming
FluentResults - A generalised Result object implementation for .NET/C#
docs - User documentation for Knative components.
OneOf - Easy to use F#-like ~discriminated~ unions for C# with exhaustive compile time matching
docs - This repository contains .NET Documentation.
ApiExceptions - Reinventing C# exceptions
github-docs - The open-source repo for docs.github.com
ASP.NET Core - ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
CoreFX - This repo is used for servicing PR's for .NET Core 2.1 and 3.1. Please visit us at https://github.com/dotnet/runtime
Strong Namer
xperience-community-cqrs - A CQRS implementation influenced by jbogard/MediatR combined with vkhorikov/CSharpFunctionalExtensions Monads for Kentico Xperience applications.