QuickDBS.Core 1.0.3

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

// Install QuickDBS.Core as a Cake Tool
#tool nuget:?package=QuickDBS.Core&version=1.0.3

QuickDBS

"QuickDBS" short for "Quick Database Services" is a library to perform CRUD operations on SQL Server, MySql and SQLite databases quickly and easily. It works near to the metal so it is as good as using ADO with the simplicity and ease.

In addition to database services, it has support libraries to generate Web APIs, Razor Pages and Blazor UI pages dynamically and connect them via supported QuickDBS databases and that it further.

Build Status

.NET

NuGet Packages

The following are the links to the NuGet packages. You can either use Package Manager in Visual Studio or CLI in VS Code.

Download QuickDBS for SQLite from QuickDBS.SQLite or

Download QuickDBS for SQL Server from QuickDBS.SQLServer or

Download QuickDBS for MySql from QuickDBS.MySQL

Download QuickDBS.API to generate Web APIs dynamically from the QuickDBS supported databases from QuickDBS.API

Download QuickDBS.Blazor to generate Blazor UI pages dynamically from the models that are connected to the QuickDBS supported databases from QuickDBS.Blazor

Download QuickDBS.Razor to generate Razor UI pages dynamically from the models that are connected to the QuickDBS supported databases from QuickDBS.Razor

Features

  • Single line to connect to the database.
  • Create Tables from your Classes in the database.
  • Generate Classes under Models folder in your project from the tables of the selected database.
  • Read records using GetById, GetAll, GetAllWhere methods.
  • Add records using Create and CreateMany methods.
  • Update records using UpdateById and UpdateMany methods.
  • Delete records using DeleteById and DeleteMany methods.
  • Get custom records by custom return queries using Query method.
  • Execute custom non-returning queries using NonQuery method.
  • Execute queries under Transactions using CreateTransaction and once done, commit them using CommitTransaction or rollback using RollbackTransaction

Note: Class Name = Table Name, Property Names = Field Names. Always Id is the Auto-incrementing, Primary Key having Int64 type. It ignores the properties which are custom/user created. To illustrate it, in the following example, the property Hobby is ignored and other 2 properties are used to create the table as well as perform CRUD operations.

public class Person
{
    public Int64 Id { get; set; }
    public string Name { get; set; }
    public Hobby MyHobby { get; set; } // This property is ignored automatically.
}

Usage

All SQL Server, MySql and SQLite libraries of QuickDBS works very much identical with just the change in the connection string. It makes switching between SQL Server, MySql and SQLite easier. It also has the ability to group different database executions under a transaction using CreateTransaction method following with either CommitTransaction or RollbackTransaction methods as required.

The following is a simple example of how the transaction can be used.

var db = new QuickDBS.SQLite("quickdbs-test.db3");
db.CreateTransaction();

// Create Record
// Update Record
// Read Record
// Delete Record

db.RollbackTransaction();

The above code connects to a SQLite db and a Transaction is started by executing db.CreateTransaction(); Then a series of CRUD operations are undertaken and finally when the code reaches db.RollbackTransaction(); it reverts back to the original state. If you replace it with db.CommitTransaction(); it will retain the changes in the database.

By default, CreateMany, UpdateMany, DeleteMany and NonQuery methods works exclusively with Transaction without you defining it. Multiple changes to records are either committed when whole transaction is complete or rolled back when something goes wrong.

Power Features

Apart from CRUD operations, this can be used to generate classes from the connected database using GenerateClassesForTables and create tables from the classes you have into the selected database using CreateTable methods.

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 netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on QuickDBS.Core:

Package Downloads
QuickDBS.SQLServer

A library to perform CRUD operations on SQL Server databases quickly and easily. It works near to the metal so it is as good as using ADO with the simplicity and ease.

QuickDBS.SQLite

A library to perform CRUD operations on SQLite databases quickly and easily. It works near to the metal so it is as good as using ADO with the simplicity and ease.

QuickDBS.MySQL

A library to perform CRUD operations on MySql databases quickly and easily. It works near to the metal so it is as good as using ADO with the simplicity and ease.

QuickDBS.API

A quick API generator - Minimal as well as Controller based, using any of the supported QuickDBS databases.

QuickDBS.Blazor

Quickly generate Blazor pages for models to list the records, add new records, update existing or delete from the available records. It requires the implementation of any of the supported QuickDBS databases.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 3,942 8/19/2022
1.0.2.1 1,078 1/2/2022
1.0.2 1,464 11/29/2021
1.0.1.9 1,028 11/27/2021
1.0.1.8 3,910 11/25/2021
1.0.1.7 1,509 11/16/2021
1.0.1.6 1,466 11/8/2021
1.0.1.5 875 11/6/2021
1.0.1.4 1,412 11/6/2021
1.0.1.3 1,377 11/4/2021
1.0.1.2 1,133 10/25/2021
1.0.1 1,287 10/23/2021
1.0.0 948 10/23/2021