CSharpFunctionalExtensions
CSharpFunctionalExtensions copied to clipboard
Functional extensions for C#
I think I just determined that Maybe can't be used to hold enum's because it can currently only hold reference types, is this correct? If so, I think it's because...
I suggest Appveyor for .NET projects but you can use both via git hooks
With the _result_ pattern, I often feel the need to have code which is able to create an error based on **another** error: ``` public UnitResult SaveItem(Item item) { Result...
I'm writing an important integration with a buggy third-party API that constantly changes its returning models. For debugging purposes and to be able to reprocess or replay its responses, I...
I have a lot of code like ```csharp GetEntity(entityId) .Bind(entity => GetNestedEntity(entity.NestedEntityId).Map(nestedEntities => (entity, nestedEntities)); Result GetEntity(EntityId id) => throw null!; Result GetNestedEntity(NestedEntityId id) => throw null!; ``` i.e. in...
Previously `GetEqualityComponents()` returned `IEnumerable`. Now it returns `IEnumerable`. If the ValueObject holds an Entity and it is used as an Equality Component it causes a compile time error if the...
Covariance is only working with interfaces. Meaning something like this is possible: ``` public interface IVehicle { } public class Car : IVehicle { } public class Bus : IVehicle...
Hello! Any chance `AsMaybeAsync` could be added, just as we have `ToResultAsync`? It would allow for less clutter when combined with EF. Current: `Maybe maybeEntity = (await dbContext.Entity.FirstOrDefaultAsync(x => x.Id...
Hello, colleagues. I can't figure out how to translate this code, namely, it confuses the function in case of failure. Is it possible to combine it somehow? Source code ```csharp...
EF COre The LINQ expression 'DbSet could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a...