Revo.Infrastructure 1.38.2

dotnet add package Revo.Infrastructure --version 1.38.2
                    
NuGet\Install-Package Revo.Infrastructure -Version 1.38.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Revo.Infrastructure" Version="1.38.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Revo.Infrastructure" Version="1.38.2" />
                    
Directory.Packages.props
<PackageReference Include="Revo.Infrastructure" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Revo.Infrastructure --version 1.38.2
                    
#r "nuget: Revo.Infrastructure, 1.38.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Revo.Infrastructure@1.38.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Revo.Infrastructure&version=1.38.2
                    
Install as a Cake Addin
#tool nuget:?package=Revo.Infrastructure&version=1.38.2
                    
Install as a Cake Tool

<p align="center"> <img src="https://github.com/revoframework/Revo/blob/develop/res/revo-framework.png" alt="Revo framework"> </p> <p align="center"> <a href="https://dev.azure.com/revoframework/Revo/_build?definitionId=1&view=runs"><img src="https://img.shields.io/azure-devops/build/revoframework/7ff8258b-dd3c-4007-9d06-7609742e93cf/1/develop?style=flat-square&logo=azure-pipelines" alt="Build status"></a> <a href="https://codecov.io/gh/revoframework/Revo"><img src="https://img.shields.io/codecov/c/github/revoframework/Revo?logo=codecov&style=flat-square" alt="Code coverage"></a> <a href="https://github.com/revoframework/Revo/releases"><img src="https://img.shields.io/github/release-date/revoframework/Revo?label=latest%20release&style=flat-square" alt="Latest release date"></a> <a href="https://www.nuget.org/packages?q=revo"><img src="https://img.shields.io/nuget/v/Revo.Core?logo=NuGet&style=flat-square" alt="NuGet packages"></a> <a href="https://pkgs.dev.azure.com/revoframework/_packaging/revoframework/nuget/v3/index.json"><img src="https://img.shields.io/badge/nuget%20CI-source-blue?logo=NuGet&style=flat-square" alt="CI NuGet feed at Azure"></a><br> <a href="https://revoframework.gitbook.io/revo/"><img src="https://img.shields.io/badge/docs-GITBOOK-blue.svg?style=flat-square" alt="Docs"></a> <a href="https://gitter.im/revoframework/Revo?utm_source=share-link&utm_medium=link&utm_campaign=share-link"><img src="https://img.shields.io/gitter/room/revoframework/Revo?color=4BB595&logo=gitter&&style=flat-square" alt="Gitter chat"></a> <a href="https://github.com/revoframework/Revo/pulls"><img src="https://img.shields.io/badge/PRs-welcome-green?style=flat-square" alt="PRs welcome"></a> <a href="https://github.com/revoframework/Revo/blob/develop/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="License"></a> </p>

Revo Framework

Revo is an application framework for modern server C#/.NET applications built with event sourcing, CQRS and DDD.

Development of this framework is supported by <a href="https://olify.io">OLIFY - smarter solution for facility management & maintenance.</a>

Contents

⚡️ Features

The project combines the concepts of event sourcing, CQRS and DDD to provide framework for building applications that are scalable, maintainable, can work in distributed environments and are easy to integrate with outside world. As such, it takes some rather opinionated approaches on the design of certain parts of its architecture. Revo also offers other common features and infrastructure that is often necessary for building complete applications – for example, authorizations, validations, messaging, integrations, multi-tenancy or testing. Furthermore, its extensions implement other useful features like entity history change-tracking, auditing or user notifications.

Domain-Driven Design
Building blocks for rich DDD-style domain models (aggregates, entities, value objects, domain events, repositories...).

Event Sourcing
Implementing event-sourced entity persistence with support for multiple event store backends (PostgreSQL, MSSQL, SQLite...).

CQRS
Segregating command and query responsibilities with:

A/synchronous event processing
Support for both synchronous and asynchronous event processing, guaranteed at-least-once delivery, event queues with strict sequence ordering (optionally), event source catch-ups, optional pseudo-synchronous event dispatch for listeners (projectors, for example).

Data access
Thin abstraction layer for easy data persistence (e.g. querying read models) using Entity Framework Core, Entity Framework 6, RavenDB, testable in-memory database or other data providers. Includes support for simple database migrations.

Projections
Support for read-model projections with various backends (e.g. Entity Framework Core (PostgreSQL, MSSQL, SQLite,...), Entity Framework 6, RavenDB...), automatic idempotency- and concurrency-handling, etc.

SOA, messaging and integration
Scale and integrate by publishing and receiving events, commands and queries using common messaging patterns,<br> e.g. with RabbitMQ message queue (using EasyNetQ connector or Rebus service bus).

Sagas
Coordinating long-running processes or inter-aggregate cooperation with sagas that react to events<br>(a.k.a. process managers).

Authorization
Basic permission/role-based ACL for commands and queries, fine-grained row filtering.

Other minor features:

👓 Show me how it looks!

Super-short example of a simple application that can save tasks using event-sourced aggregates and then query them back from a RDBMS.

Event

The event that happens when changing a task's name.

public class TodoRenamedEvent : DomainAggregateEvent
{
    public TodoRenamedEvent(string name)
    {
        Name = name;
    }

    public string Name { get; }
}

Aggregate

The task aggregate root.

public class Todo : EventSourcedAggregateRoot
{
    public Todo(Guid id, string name) : base(id)
    {
        Rename(name);
    }
    
    protected Todo(Guid id) : base(id)
    {
    }
    
    public string Name { get; private set; }
    
    public void Rename(string name)
    {
        if (!Name != name)
        {
            Publish(new TodoRenamedEvent(name));
        }
    }
    
    private void Apply(TodoRenamedEvent ev)
    {
        Name = ev.Name;
    }
}

Command and command handler

Command to save a new task.

public class CreateTodoCommand : ICommand
{
    public CreateTodoCommand(string name)
    {
        Name = name;
    }

    [Required]
    public string Name { get; }
}