Skip to content

Releases: BitzArt/Flux

Prerelease-v0.9.0

10 Jan 20:38
Compare
Choose a tag to compare

Added a fancy package icon

Prerelease-v0.8.0

05 Jan 12:24
a64aca3
Compare
Choose a tag to compare

Overview

Some updates were made to working with json data

FromJsonFile

Can be used to read json data from a file

services.AddFlux(flux =>
{
    flux.AddService("My-External-Service")
        .UsingJson()
            .WithBaseFilePath("./data") // you can specify base file path to use with FromJsonFile
            .AddSet<TestModel, int>()
                .FromJsonFile("test-model.set.json")
                .WithKey(x => x.Id);
});

FromJson

Can be used to read raw json data as string

var myJson =
    """
    [
        {
            "id": 1,
            "name": "test object 1"
        },
        {
            "id": 2,
            "name": "test object 2"
        }
    ]
    """;

services.AddFlux(flux =>
{
    flux.AddService("My-External-Service")
        .UsingJson()
            .AddSet<TestModel, int>()
                .FromJson(myJson)
                .WithKey(x => x.Id);
});

Prerelease-v0.7.0

04 Jan 15:48
Compare
Choose a tag to compare

Overview

Added a handy new package: BitzArt.Flux.Json.

It allows mocking external dependencies by providing Flux with mock data in json format.

Documentation for this new functionality is coming in future updates.

Example

services.AddFlux(flux =>
{
    flux.AddService("My-External-Service")
        .UsingJson()
        .AddSet<TestModel, int>("./data/test-model.set.json").WithKey(x => x.Id);
});

Prerelease-v0.6.0

14 Oct 12:50
Compare
Choose a tag to compare

Added documentation website: https://bitzart.github.io/Flux/
Added links to the documentation website in the package readme file

Prerelease-v0.5.0

02 Oct 10:02
5ce376f
Compare
Choose a tag to compare

What has changed:

  • Decoupled Sets from Models.
  • The package now allows registering multiple Sets for the same Model
  • Configure behavior on attempting to add multiple Sets for the same Model without specifying distinct Set names
  • Unit Tests

Interface changes:

  • IFluxRestServiceBuilder.AddModel method was replaced with IFluxRestServiceBuilder.AddSet method
  • IFluxRestServiceBuilder.AddSet method: Added parameter 'name' to allow specifying distinct Set names for Sets reusing the same Model
  • IFluxContext.Model method was replaced with IFluxContext.Set method.
  • IFluxContext.Set method: Added parameter 'set' to allow specifying a Set name for Sets reusing the same Model
  • Other minor changes

Refer to the documentation for the updated usage examples.

Prerelease - v0.4.0

30 Sep 12:10
Compare
Choose a tag to compare

All references of the term "Entity" were replaced with the new term "Model". Please update your existing implementations to match the new terminology convention.