SimpleDB 5.7.0

dotnet add package SimpleDB --version 5.7.0                
NuGet\Install-Package SimpleDB -Version 5.7.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="SimpleDB" Version="5.7.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SimpleDB --version 5.7.0                
#r "nuget: SimpleDB, 5.7.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.
// Install SimpleDB as a Cake Addin
#addin nuget:?package=SimpleDB&version=5.7.0

// Install SimpleDB as a Cake Tool
#tool nuget:?package=SimpleDB&version=5.7.0                

SimpleDB

About

SimpleDB allows you to design your tables using standard C# classes, there are a number of methods for standard CRUD operations and support for the following features:

  • Foreign Keys
  • Unique indexes across multiple properties
  • Before and after triggers for insert, update and delete
  • Sequences for unique indexes
  • Select Caching Strategy for individual classes (tables)
    • None - Records are read from storage as required.
    • Memory - Records are kept in memory.
    • Sliding - Records are retained in memory for n ms and when no longer used, memory is released.
  • Select Write Strategy for individual classes (tables)
    • Forced - Records are saved immediately to storage
    • Lazy - Records are saved periodically to storage or after specific time.
  • Compression types for saving data to storage
    • None - Data is not compressed
    • Brotli - Data is compressed prior to saving

How it works

The class represents a record (row) of data, which exposes properties for the data (columns), there is a TableAttribute that defines the policies for the table of data. The class must descend from TableRowDefinition class in order to work.

Only properties which are public get/set are saved to storage, read only properties are not saved. One important caveat is that the set method must call the Update() method which is defined in TableRowDefinition, this ensures that any changes are recognised when performing insert or update actions.

    [Table("Settings", CompressionType.Brotli, CachingStrategy.None)]
    internal class SettingsDataRow : TableRowDefinition
    {
        string _name;
        string _value;

        public string Name
        {
            get
            {
                return _name;
            }
            set
            {
                if (_name == value)
                    return;

                _name = value;
                Update();
            }
        }

        public string Value
        {
            get
            {
                return _value;
            }
            set
            {
                if (_value == value)
                    return;

                _value = value;
                Update();
            }
        }
    }

Registering Tables

SimpleDB has been designed with IoC in mind, tables can be registered and retrieved through DI engines.

    services.AddSingleton(typeof(TableRowDefinition), typeof(SettingsDataRow));

Using tables

    internal sealed class SettingsProvider : IApplicationSettingsProvider
    {
        private readonly ISimpleDBOperations<SettingsDataRow> _settingsData;

        public SettingsProvider(ISimpleDBOperations<SettingsDataRow> settingsData)
        {
            _settingsData = settingsData ?? throw new ArgumentNullException(nameof(settingsData));
        }
    }

You can then call methods on _settingsData to perform normal CRUD operations.

More Information

More information is available at https://www.pluginmanager.website/Docs/ or by visiting the GitHub Homepage https://github.com/k3ldar/.NetCorePluginManager

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  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 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 is compatible. 
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 SimpleDB:

Package Downloads
PluginManager.DAL.TextFiles

Plugin Manager Data access layer for SimpleDb

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.7.0 43 12/20/2024
5.6.1 100 6/12/2024
5.6.0 489 12/1/2023
5.5.2 127 11/25/2023
5.5.1 239 10/12/2023
5.5.0 123 10/9/2023
5.4.0 392 9/2/2023
5.3.0 169 7/30/2023
5.2.0 164 7/30/2023
5.1.0 221 6/11/2023
5.0.3 581 11/24/2022
5.0.0 587 11/15/2022
0.0.9 428 8/19/2022
0.0.1 422 8/14/2022

Supports net 6.0, net8.0 and net9.0