Vortex is a .Net Standard framework focused on Functional Programming.
Write elegant and testeable solutions on C# using a Monadic Framework that comes in two flavours:
-
From notation
await // Try to create an order from maybeOrder in from order in _orderRepository.GetByIdAsync(orderId) select OrderBehavior.TryCheckout(order) // Update database from result in maybeOrder.AwaitSideEffect(_orderRepository.UpdateAsync) // Return results select result.Match(Ok, InternalServerError("Error"));
-
Fluent notation
return await // Try to create an order _orderRepository.GetByIdAsync(orderId) .Select(order => OrderBehavior.TryCheckout(order)) // Update database .SelectMany(m => m.AwaitSideEffect(_orderRepository.UpdateAsync)) // Return results .Select(m => m.Match(Ok, InternalServerError("Error")));
-
Download nuget package
-
Download GitHub releases