OElite.Data 5.0.9

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

OElite.Data

Core data access layer: generic repository, DbCentre base, and MongoDB integration primitives for OElite applications.

NuGet Version .NET

Overview

OElite.Data provides the foundational data access patterns for OElite applications. It defines the DataRepository<T> generic repository, the DbCentre base class for MongoDB-backed data centres, and the IDataRepository contract that all repositories implement.

This package is consumed by both the OElite.Common.Hosting services layer (for dependency injection wiring) and by every application-specific repository that extends DataRepository<T> to add entity-specific queries.

Features

📚 Repository Pattern

  • DataRepository<T>: Generic repository base class providing standard CRUD operations
  • IDataRepository: Interface contract for all repositories (enables mocking and substitution)
  • Type-safe entity operations with async/await throughout

🗄️ DbCentre Base

  • MongoDB Integration: Base class for MongoDB-backed data centres
  • Connection lifecycle management
  • Collection accessor utilities
  • Logging integration with IAppConfig

🔌 Extensibility

  • Subclassable for application-specific repositories
  • Supports custom query methods per entity type
  • Compatible with OElite.Restme.MongoDb for advanced MongoDB features

Quick Start

1. Installation

dotnet add package OElite.Data

2. Define a Custom Repository

using OElite.Data;
using OElite.Restme.Utils;

public class ProductRepository : DataRepository<Product>
{
    public ProductRepository(DbCentre dbCentre) : base(dbCentre) { }

    public Task<List<Product>> GetByCategoryAsync(string categoryId)
    {
        return FindAsync(p => p.CategoryId == categoryId);
    }
}

Dependencies

  • OElite.Restme 2.x (MongoDB driver, IRestme provider)
  • OElite.Restme.Utils 2.x (BaseEntity, attributes)
  • OElite.Data.Platform - Platform-specific repositories, PlatformDb, and platform index management
  • OElite.Common.Hosting - DI auto-discovery and configuration

License

Copyright (c) Phanes. All rights reserved.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 (5)

Showing the top 5 NuGet packages that depend on OElite.Data:

Package Downloads
OElite.Core.Web

Package Description

OElite.Core

Package Description

OElite.Services

Package Description

OElite.Data.Platform

Package Description

OElite.Common.Hosting

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.0.9 112 8/31/2026
5.0.2 684 4/3/2023
5.0.2-ci7368 464 3/17/2023
5.0.0 1,343 1/21/2020