RFBCodeWorks.DatabaseObjects 1.0.1

dotnet add package RFBCodeWorks.DatabaseObjects --version 1.0.1                
NuGet\Install-Package RFBCodeWorks.DatabaseObjects -Version 1.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="RFBCodeWorks.DatabaseObjects" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RFBCodeWorks.DatabaseObjects --version 1.0.1                
#r "nuget: RFBCodeWorks.DatabaseObjects, 1.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.
// Install RFBCodeWorks.DatabaseObjects as a Cake Addin
#addin nuget:?package=RFBCodeWorks.DatabaseObjects&version=1.0.1

// Install RFBCodeWorks.DatabaseObjects as a Cake Tool
#tool nuget:?package=RFBCodeWorks.DatabaseObjects&version=1.0.1                



This library contains several objects that mean to represent Database and Tables, and how they can be interacted with. All the queries are generated dynamically via the SqlKata query compiler, and run using DbCommands.

Unlike dapper and SqlKata.Execution, which maps the query result to a DTO, this library returns raw values/DataTables/DataRows from the database. Since the objects themselves use SqlKata to generate the queries, this should be easily combined with usage of SqlKata.Execution.


  • IDatabase -- Represents the concrete form of the AbstractDatabase class
  • IDatabaseTable -- Defines the methods to interact with Database tables
  • IPrimaryKeyTable -- Extends IDatabaseTable with methods to interact using a given primary key value
  • ICompositeKeyTable -- Extends IDatabaseTable for tables with a composite key

Core Classes

  • DBOps (static)
    • Contains the logic and static methods to interact with a DBConnection
  • DBCommands (static)
    • Several methods to create/interact with DBCommands
  • AbstractDatabase
    • Base class that defines interactions with a database, and runs the commands generated by the associated DatabaseTable objects
    • Contains a reference to the SqlKata.Compiler that is used to compile the query, then run it
  • DatabaseTable
    • Base class all other *Table classes are derived from. Contains the base logic and implements IDatabaseTable
  • PrimaryKeyTable (Derived from DatabaseTable)
    • Introduces the 'PrimaryKey' property to define the name of the primary key column.
    • Introduces several methods to interact with the primary key column.
  • CompositeKeyTable (Derived from DatabaseTable)
    • Introduces properties and methods to interact with a composite key table.

Required Libraries

  • SqlKata
  • RFBCodeworks.SqlKata.Extensions
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on RFBCodeWorks.DatabaseObjects:

Package Downloads

Extends RFBCodeWorks.DatabaseObjects to provides objects that represent an MSAccess database, as well as an MS EXcel workbook. Using SQL to query an excel workbook also requires some special syntax, so the ExcelWorkSheet object is also provided to ease that translation. The OLEDBConnection string will also be generated depending on the file extension (.xls vs .xslx/.xlsm), since each file format requires a different connection adapater. The AccessDatabase object is a concrete class to use the MSAccess Compiler provided by RFBCodeWorks.SqlKata.MSOfficeCompilers (required nuget pkg) Note: Due to requiring the OLEDB driver, this package is compiled for x86/x64 only.


Adds the 'SqlLiteDatabase' class to the RFBCodeWorks.DatabaseObjects.DatabaseTypes namespace. This class uses System.Data.Sqlite.Core's SqliteConnection and SqliteCommand to communicate with the db, and Sqlkata.Compilers.SqliteCompiler to compile the queries.


Adds the 'SqlServerDatabase' class to the RFBCodeWorks.DatabaseObjects.DatabaseTypes namespace. This class uses System.Data.Sqlclient's SqlConnection and SqlCommand to communicate with the db, and Sqlkata.Compilers.SqlServerCompiler to compile the queries.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 500 2/1/2024 1,052 1/20/2024 579 1/20/2024 645 9/26/2023 1,680 1/30/2023

Updated NuGet packages. Add .targets file to nuget package