Configure Flux

In this documentation we will review the general installation, configuration and usage, regardless of which implementatin you choose. Refer to your implementation of choice for more information on how to use it.

Installation

Install your implementation package of choice.

Configure Flux

To configure Flux, you need to add it to your DI container. You can do this by calling the AddFlux extension method on your IServiceCollection instance.

services.AddFlux(flux =>
{
    // Configure Flux here
});

When configuring Flux, first you need to add your external services and give each one a unique name. You can add and configure external services by calling the AddService method:

services.AddFlux(flux =>
{
    flux.AddService("service1")
    // Configure service1 here

    flux.AddService("service2")
    // Configure service2 here
});

Example external service configuration

services.AddFlux(flux =>
{
    flux.AddService("service1")
    .UsingRest("https://test.com")
    .AddSet<Book>()
        .WithEndpoint("books");
});

This example uses Flux.REST.

Refer to your implementation of choice for more information on how to configure your external services.