RKSoftware.DAL.InMemory 9.0.1

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

RKSoftware.DAL.InMemory

NuGet License

Overview

RKSoftware.DAL.InMemory is a .NET library that provides an implementation of the RKSoftware.DAL.Core contracts using in-memory storage. It is designed for lightweight, fast, and temporary data storage, making it ideal for testing, prototyping, or scenarios where persistence is not required.

This package is part of the RK Software Systems ecosystem and provides a simple, in-memory alternative to other storage implementations.

Features

  • Full implementation of RKSoftware.DAL.Core contracts using in-memory storage.
  • Supports transactional operations with ITransactionalStorage.
  • Simplifies CRUD operations with IStorage and IReadonlyStorage.
  • Compatible with .NET 9.0.
  • Lightweight and easy to integrate with existing projects.

Installation

You can install the package via NuGet:

dotnet add package RKSoftware.DAL.InMemory --version 9.0.1

Or via the NuGet Package Manager in Visual Studio.

Usage

To use this package, reference it in your project and configure it with the provided in-memory storage implementation. Below is an example of how to set up and use the RKSoftware.DAL.InMemory package:

Example

public class Example 
{ 
  private readonly IStorage _storage;

  public Example(IStorage storage)
  {
      _storage = storage;
  }

  public async Task PerformOperationsAsync()
  {
      try
      {
          // Add an entity
          var entity = new MyEntity { Id = 1, Name = "Sample Entity" };
          await _storage.AddAsync(entity);
      }
      catch (Exception ex)
      {
          Console.WriteLine($"An error occurred: {ex.Message}");
      }
  }
}

Configuration

To use RKSoftware.DAL.InMemory, you can register its services in your dependency injection container. Below is an example of how to configure it in an ASP.NET Core application:

using Microsoft.Extensions.DependencyInjection; 
using RKSoftware.DAL.InMemory;

var services = new ServiceCollection();
// Register RKSoftware.DAL.InMemory services 
services.UseInMemory()
  .AddReadonlyStorage()
  .AddStorage();
Available Registration Methods

UseInMemory: Initializes the in-memory storage configuration. AddReadonlyStorage: Registers read-only storage. AddStorage: Registers full CRUD storage.

Documentation

For more details about the core contracts, refer to the RKSoftware.DAL.Core documentation.

Repository

The source code for this package is available on GitHub:

RKSoftware.DAL GitHub Repository

Feel free to contribute, report issues, or suggest features.

License

This package is licensed under the MIT OR Apache-2.0 license. You may choose either license to use this package. See the LICENSE file for more details.

Tags

  • DAL
  • RKSoftware
  • In-Memory
  • .NET 9
  • Data Access Layer
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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
9.0.1 167 4/18/2025
8.0.1 186 4/7/2025
2.0.1 260 4/24/2023
1.0.7 384 11/27/2022
1.0.6 362 1/2/2022
1.0.5 394 3/31/2021