OElite.Data
5.0.9
dotnet add package OElite.Data --version 5.0.9
NuGet\Install-Package OElite.Data -Version 5.0.9
<PackageReference Include="OElite.Data" Version="5.0.9" />
<PackageVersion Include="OElite.Data" Version="5.0.9" />
<PackageReference Include="OElite.Data" />
paket add OElite.Data --version 5.0.9
#r "nuget: OElite.Data, 5.0.9"
#:package OElite.Data@5.0.9
#addin nuget:?package=OElite.Data&version=5.0.9
#tool nuget:?package=OElite.Data&version=5.0.9
OElite.Data
Core data access layer: generic repository, DbCentre base, and MongoDB integration primitives for OElite applications.
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 operationsIDataRepository: 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)
Related Packages
- 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 | Versions 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. |
-
net10.0
- OElite.Common (>= 5.0.9)
- OElite.Restme.MongoDb (>= 2.1.1-develop.2409)
- OElite.Restme.Utils (>= 2.1.1-develop.2409)
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 |