Unleasharp.DB.Base
1.8.5
dotnet add package Unleasharp.DB.Base --version 1.8.5
NuGet\Install-Package Unleasharp.DB.Base -Version 1.8.5
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="Unleasharp.DB.Base" Version="1.8.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Unleasharp.DB.Base" Version="1.8.5" />
<PackageReference Include="Unleasharp.DB.Base" />
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 Unleasharp.DB.Base --version 1.8.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Unleasharp.DB.Base, 1.8.5"
#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 Unleasharp.DB.Base@1.8.5
#: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=Unleasharp.DB.Base&version=1.8.5
#tool nuget:?package=Unleasharp.DB.Base&version=1.8.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
๐ ๏ธ Unleasharp.DB.Base
A lightweight, database-agnostic library for .NET that provides connection management, query building, and data serialization capabilities.
๐ฏ Key Concepts
This library provides a foundation for database operations with the following core features:
๐ Connection Handling
- Automatic connection creation and management
- Configurable automatic connection regeneration after specified intervals
- Ensures database connections are always open and ready for use
๐งต Threading Support
- Thread-safe connection management through
ConnectorManager - Each thread receives its own dedicated database connection instance
๐ Query Generation
- Query class: Holds SQL query parameters in an engine-agnostic manner
- QueryBuilder class: Executes queries against the database and maps results to specified types
- Follows fluent interface pattern for intuitive query building
๐ Serialization
- Automatic mapping of database results to C# objects using generic type parameters
- Supports both simple class mapping and attribute-based schema definitions
๐ง Query Generation Architecture
The library follows a CRTP (Curiously Recurring Template Pattern) approach where:
- The base
Queryclass provides engine-agnostic functionality - Engine-specific implementations handle the actual SQL rendering
- Query building follows standard SQL syntax with fluent method chaining
๐ Documentation Resources
- ๐ GitHub Pages Documentation - Complete documentation
- ๐ฏ Getting Started Guide - Quick start guide
- ๐ Changelog - New features and improvements
๐ Database Engine Implementations
| Database Engine | Unleasharp.DB Implementation |
|---|---|
| MySQL ๐ฌ | Unleasharp.DB.MySQL |
| SQLite ๐พ | Unleasharp.DB.SQLite |
| PostgreSQL ๐ | Unleasharp.DB.PostgreSQL |
| MSSQL ๐ | Unleasharp.DB.MSSQL |
| DuckDB ๐ฆ | Unleasharp.DB.DuckDB |
๐ฆ Dependencies
- Unleasharp - Multipurpose library
๐ Version Compatibility
This library targets .NET 6.0 and later versions. For specific version requirements, please check the package dependencies.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
| Product | Versions 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 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.
-
net6.0
- FastCloner (>= 3.3.12)
- Microsoft.CSharp (>= 4.7.0)
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
- Microsoft.Extensions.Logging (>= 9.0.9)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.9)
- Microsoft.Extensions.Logging.Console (>= 9.0.9)
- System.Linq.Async (>= 6.0.3)
- Unleasharp (>= 1.1.2)
-
net8.0
- FastCloner (>= 3.3.12)
- Microsoft.CSharp (>= 4.7.0)
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
- Microsoft.Extensions.Logging (>= 9.0.9)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.9)
- Microsoft.Extensions.Logging.Console (>= 9.0.9)
- System.Linq.Async (>= 6.0.3)
- Unleasharp (>= 1.1.2)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Unleasharp.DB.Base: