ToolBX.SimpleRepositories.Bundles 3.0.0

dotnet add package ToolBX.SimpleRepositories.Bundles --version 3.0.0
                    
NuGet\Install-Package ToolBX.SimpleRepositories.Bundles -Version 3.0.0
                    
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.Bundles" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ToolBX.SimpleRepositories.Bundles" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ToolBX.SimpleRepositories.Bundles" />
                    
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 ToolBX.SimpleRepositories.Bundles --version 3.0.0
                    
#r "nuget: ToolBX.SimpleRepositories.Bundles, 3.0.0"
                    
#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 ToolBX.SimpleRepositories.Bundles@3.0.0
                    
#: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=ToolBX.SimpleRepositories.Bundles&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ToolBX.SimpleRepositories.Bundles&version=3.0.0
                    
Install as a Cake Tool

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.

StartingId

By default, the starting ID for a bundle is 0. If you want to change that, you can do so by overriding the StartingId property in your bundle repository.

public class MyBundleRepository : BundleRepository<MyEntity>
{
	protected override int StartingId => 1;
}

With this, your items will be assigned IDs starting at 1 instead of 0.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 151 9/27/2024
3.0.0-beta1 99 9/23/2024
2.2.0 197 1/13/2024
2.2.0-beta1 125 1/7/2024
2.1.1 236 6/19/2023
2.1.0 300 4/27/2023
2.1.0-beta1 190 11/15/2022
2.0.0 389 11/12/2022
2.0.0-beta1 216 10/5/2022
1.0.1 443 10/5/2022
1.0.1-beta2 219 7/20/2022
1.0.0 507 7/1/2022