ToolBX.SimpleRepositories 2.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package ToolBX.SimpleRepositories --version 2.1.1
NuGet\Install-Package ToolBX.SimpleRepositories -Version 2.1.1
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="ToolBX.SimpleRepositories" Version="2.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ToolBX.SimpleRepositories --version 2.1.1
#r "nuget: ToolBX.SimpleRepositories, 2.1.1"
#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.
// Install ToolBX.SimpleRepositories as a Cake Addin
#addin nuget:?package=ToolBX.SimpleRepositories&version=2.1.1

// Install ToolBX.SimpleRepositories as a Cake Tool
#tool nuget:?package=ToolBX.SimpleRepositories&version=2.1.1

SimpleRepositories

SimpleRepositories

Base classes and interfaces for setting up simple repositories.

Bundles

What the hell is a bundle?

A bundle is basically just a bundle of entities which is typically stored in a serializable file that you can query and/or save to.

It's useful if you need to store data but don't necessarily require a database or if you're just prototyping a quick and dirty idea.

For your information, I use ReadOnlyBundleRepository and BundleRepository to store Rough Trigger's game data such as spritesheet maps (holds sprite positions and sizes,) tilesets or items.

Does it have to be a serialized file?

No. It can be just about anything, really. One of the only contraint for bundles is that entities must have an Id property. This id is automatically incremented whenever a new entity is added to the bundle using ToolBX.Unicity.

Getting started

Check out the unit test project for samples on how to use it.

Upcoming changes

2.1.0 (currently in beta) will add an abstract StartingId property to the BundleRepository class for cases where you might want something other than zero as a starting ID in your repository.

The name and accessiblity of this property might change from now to official release. It could end up being virtual since wanting a different starting ID is kind of an exceptional case and not necessarily standard practice but I don't like having virtual properties on base classes because then you kind of "have to guess" its existence. Forcing it to be set leaves nothing to guesses. We'll see how it turns out and adjust accordingly.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ToolBX.SimpleRepositories:

Package Downloads
ToolBX.SimpleRepositories.Bundles

Base classes and interfaces for setting up repositories that query bundles of entities.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.2.0 154 1/13/2024
2.2.0-beta1 85 1/7/2024
2.1.1 184 6/19/2023
2.0.2 147 5/2/2023
2.0.1 223 4/27/2023
2.0.0 358 11/12/2022
2.0.0-beta1 129 10/5/2022
1.0.1 485 10/5/2022
1.0.1-beta2 143 7/20/2022
1.0.1-beta1 116 7/19/2022
1.0.0 529 7/1/2022