Releases: BitzArt/Flux
Releases · BitzArt/Flux
Prerelease-v0.9.0
Added a fancy package icon
Prerelease-v0.8.0
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
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
Added documentation website: https://bitzart.github.io/Flux/
Added links to the documentation website in the package readme file
Prerelease-v0.5.0
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 withIFluxRestServiceBuilder.AddSet
methodIFluxRestServiceBuilder.AddSet
method: Added parameter 'name' to allow specifying distinct Set names for Sets reusing the same ModelIFluxContext.Model
method was replaced withIFluxContext.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
All references of the term "Entity" were replaced with the new term "Model". Please update your existing implementations to match the new terminology convention.