RFBCodeWorks.DataBaseObjects 1.0.0.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package RFBCodeWorks.DataBaseObjects --version 1.0.0.4                
NuGet\Install-Package RFBCodeWorks.DataBaseObjects -Version 1.0.0.4                
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.0.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RFBCodeWorks.DataBaseObjects --version 1.0.0.4                
#r "nuget: RFBCodeWorks.DataBaseObjects, 1.0.0.4"                
#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.0.4

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

RFBCodeworks.DatabaseObjects

About

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.

Interfaces

  • 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
RFBCodeWorks.DatabaseObjects.MsOffice

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.

RFBCodeWorks.DatabaseObjects.SqLite

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.

RFBCodeWorks.DatabaseObjects.SqlServer

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 575 2/1/2024
1.0.0.8 1,223 1/20/2024
1.0.0.7 634 1/20/2024 1.0.0.7 is deprecated because it has critical bugs.
1.0.0.6 707 9/26/2023
1.0.0.4 2,172 1/30/2023