Equilaterus.Vortex

Vortex is a .Net Standard framework focused on Functional Programming.

Use it! View on GitHub

Write elegant and testeable solutions on C# using a Monadic Framework

Choose your hero

From Notation

  await 
    from maybeOrder in
        from order in _orderRepository.GetById(orderId)
        select OrderBehavior.TryCheckout(order)
    from result in maybeOrder.AwaitSideEffect(_orderRepository.Update)
    select result.Match(Ok, InternalServerError("Error"));

Fluent Notation

  return await _orderRepository.GetById(orderId)    
        .Select(order => OrderBehavior.TryCheckout(order))
        .SelectMany(m => m.AwaitSideEffect(_orderRepository.Update))
        .Select(m => m.Match(Ok, InternalServerError("Error")));

Inject Behaviors not Dependencies

With a monadic architecture your applications are going to have a pure business logic that allows you to write easy tests and do not depend of any other layer. Also, your side effects are going to be centralized.

Instead of injecting the dependencies in all your project, you just have to inject the behavior with the monads giving live the pure business logic interacting with the exterior world.

Builds

  • Master v0.3.1-alpha

    Build status Build Status

  • Dev Unstable

    Build status Build Status

Releases

More info