VOOZH about

URL: https://www.nuget.org/packages/Net4x.DapperLibrary.OleDb/

⇱ NuGet Gallery | Net4x.DapperLibrary.OleDb 1.9.9.8




Net4x.DapperLibrary.OleDb 1.9.9.8

dotnet add package Net4x.DapperLibrary.OleDb --version 1.9.9.8
 
 
NuGet\Install-Package Net4x.DapperLibrary.OleDb -Version 1.9.9.8
 
 
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="Net4x.DapperLibrary.OleDb" Version="1.9.9.8" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Net4x.DapperLibrary.OleDb" Version="1.9.9.8" />
 
Directory.Packages.props
<PackageReference Include="Net4x.DapperLibrary.OleDb" />
 
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 Net4x.DapperLibrary.OleDb --version 1.9.9.8
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Net4x.DapperLibrary.OleDb, 1.9.9.8"
 
 
#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 Net4x.DapperLibrary.OleDb@1.9.9.8
 
 
#: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=Net4x.DapperLibrary.OleDb&version=1.9.9.8
 
Install as a Cake Addin
#tool nuget:?package=Net4x.DapperLibrary.OleDb&version=1.9.9.8
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

DapperLibrary.OleDb

OLE DB provider integration for DapperLibrary. This project supplies an OLE DB-specific DapperContext implementation, a provider factory and database model/type mappings suitable for ADO.NET OLE DB providers.

Purpose

Provide OLE DB engine-specific behavior while preserving the common DapperLibrary API. The assembly includes:

  • OleDbDapperContext � a DapperContext configured for OLE DB and wired to configuration via DapperConfigurationManager.
  • OleDbProviderFactory � configures parameter handling, data adapter event forwarding and command parameter preparation tailored for OLE DB semantics.
  • OleDbDatabaseModel, OleDbDatabaseModelTypes and OleDbDatabaseEnumTypes � identifier delimiters, statement terminator, parameter naming and provider-specific type/string mappings.

Key types

  • OleDbDapperContext

    • Derives from DapperContext and is initialized with OleDbProviderFactory and a DapperConfigurationManager that targets the System.Data.OleDb namespace.
    • Constructors accept an IConfiguration instance to pull connection strings and other configuration values.
  • OleDbProviderFactory

    • Inherits from ProviderFactoryBase and delegates to OleDbFactory.Instance.
    • Uses ParameterModel.ParameterPrefix = "?" and ParameterModel.AddIndex = false to match OLE DB parameter conventions (unnamed positional parameters commonly represented as ?).
    • Sets AddPrefixInParameterName = false and provides a PrepareCommandParameters implementation that creates DbParameter objects, injects them into the command and formats the command text by replacing placeholders with parameter names.
    • Attaches to RowUpdated/RowUpdating events on the OleDbDataAdapter and forwards them via the provider factory.
  • OleDbDatabaseModel and related types

    • Identifier delimiters: [ and ].
    • Batch terminator: ;.
    • Parameter prefix: ? and parameter base name: Par.
    • Type mapping strings are built around System.Data.OleDb.OleDbType names (for example Integer, BigInt, LongVarBinary, VarChar({0}), etc.).

Usage examples

Create and use an OleDbDapperContext:

var configuration = /* IConfiguration with connection strings */;
using var context = new OleDbDapperContext(configuration);
// use context.Operations / context.Schema / context.SaveDataTable etc.

The OleDbProviderFactory prepares command parameters by creating DbParameter instances and formatting the command text using parameter names (the provider uses positional ? parameters, so AddIndex is false by default in this factory).

Parameter conventions

  • OLE DB typically uses positional ? parameters. The provider factory sets ParameterPrefix to ? and does not add an index to parameter names by default (AddIndex = false).
  • PrepareCommandParameters builds parameters and then replaces indexed placeholders in the SQL command with the parameter names. This keeps parameter handling consistent with other providers in the DapperLibraries while accommodating OLE DB conventions.

Example of how values are bound in the provider:

  • For a statement with placeholders like {0}, {1}, the factory will create parameters, add them to the command and then format the command text using the actual parameter names so the provider receives a command with ?-style parameters.

Multi-targeting & compatibility

  • The project is intended to be usable on older .NET Framework targets (the solution contains many multi-targeted projects). The OLE DB provider types (System.Data.OleDb) are available in .NET Framework; when targeting .NET Core/.NET 5+ consider using ODBC or provider-specific clients if native OLE DB support isn't available for your runtime.
  • The code contains conditional compilation in related projects across the solution to produce framework-specific binaries.

Synchronous vs asynchronous behavior

  • OLE DB ADO.NET implementations traditionally have limited or no asynchronous I/O support. DapperLibrary exposes both synchronous and asynchronous APIs, but on platforms/providers without true asynchronous support the Async-suffixed methods may execute synchronously under the hood or use provider-specific async shims.
  • Prefer synchronous APIs when targeting runtimes where the underlying OLE DB implementation lacks proper async support. Use async APIs in environments where the provider supports non-blocking I/O and you need to avoid blocking threads.

Events and adapter behavior

  • OleDbProviderFactory.CreateDataAdapter attaches RowUpdating and RowUpdated event handlers and forwards these events via the provider factory. Consumers using DbDataAdapter-based save operations can subscribe to these events to customize row-level update behavior.

Notes and best practices

  • Because OLE DB commonly uses positional parameters, avoid relying on named-parameter semantics when building raw SQL for OLE DB providers; rely on the PrepareCommandParameters conventions implemented by the provider factory instead.
  • For new applications on modern .NET runtimes, consider provider choices (ODBC, native client libraries) if OLE DB provider support is limited on your target platform.
  • Use the WithConnection overloads on DapperLibrary APIs to target specific named connections for single calls to avoid shared-state contention around ConnectionStringToRead.

For implementation details review OleDbProviderFactory, OleDbDapperContext and the DbContexts types in this project.

Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 netstandard2.1 is compatible. 
.NET Framework net35 net35 is compatible.  net40 net40 is compatible.  net403 net403 was computed.  net45 net45 is compatible.  net451 net451 was computed.  net452 net452 was computed.  net46 net46 was computed.  net461 net461 is compatible.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
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 Net4x.DapperLibrary.OleDb:

Package Downloads
Net4x.Xsd2Db.Data

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.9.9.8 138 2/2/2026
1.9.9.7 138 1/13/2026
1.9.9.6 134 1/6/2026
1.9.9.5 133 1/6/2026
1.9.9.4 134 1/6/2026
1.9.9.3 138 1/5/2026
1.9.9.2 134 12/30/2025
1.9.9.1 137 12/30/2025
1.9.9 221 12/22/2025
1.6.0.12 168 12/12/2025
1.6.0.11 184 12/12/2025
1.6.0.10 483 12/9/2025
1.6.0.9 251 12/4/2025
1.6.0.8 252 12/4/2025
1.6.0.7 319 11/30/2025
1.6.0.6 229 11/27/2025
1.6.0.5 292 11/22/2025
1.6.0.4 193 11/16/2025
1.6.0.3 235 11/15/2025
1.6.0.2 315 11/14/2025
Loading failed