Beztek.Facade.Sql
1.1.3
dotnet add package Beztek.Facade.Sql --version 1.1.3
NuGet\Install-Package Beztek.Facade.Sql -Version 1.1.3
<PackageReference Include="Beztek.Facade.Sql" Version="1.1.3" />
paket add Beztek.Facade.Sql --version 1.1.3
#r "nuget: Beztek.Facade.Sql, 1.1.3"
// Install Beztek.Facade.Sql as a Cake Addin #addin nuget:?package=Beztek.Facade.Sql&version=1.1.3 // Install Beztek.Facade.Sql as a Cake Tool #tool nuget:?package=Beztek.Facade.Sql&version=1.1.3
Beztek.Facade.Sql Library
This library is intended for providing an facade ORM layer over SQL Databases. It uses SQLKata, and thus enables a level of abstraction over the nuances and particular syntaxes of various databases.
The source code for the entire project, as well as the example project and the unit tests can be found here: https://github.com/Beztek-Software-Solutions/sql-facade
Overview
It is intended to be cloud portable and take advantage of the native managed services in each cloud, such as managed Postgres DBs or managed Sql Server DBs. It is a reusable and configurable sql facade library.
Steps to use Sql Facade
- Find SQL connection string. It currently supports Postgres SQL, Sql Server and SQLite (in-memory and file-based)/
- Instantiate the SqlFacade object from the SqlFacadeFactory, using the appropriate SqlFacadeConfig object
Note: You can use Common Table Expressions to query any complex custom SQL if needed
Sample Project
The solution contains a sample project that you can modify and run to test out different use cases and scenarios. Simply set it as the startup project and then run. The unit tests also provide examples of how to use this library.
Useful ways to use this library
- Local development can use a SQLite DB file, and when deployed it can use DBs such as Postgres or Sql Server, which could be managed cloud DBs as well. SQLite can be isntantiated in-memory as in the example project and the unit tests. This enables quick-and-dirty offline development without the need of a full database.
- If your desire is DB portability, stick with the standard SDK methods provided, and only override with raw modifiers for ANSI SQL functions.
- If your desire is to be able to dynamically build SQL statements and/or search filter criteria, then you can use CTEs (using the SDK for building SQLSelect, or with or without raw SQL select statements in a Common Table Expression as the base).
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
-
net7.0
- Microsoft.Data.SqlClient (>= 5.2.1)
- Microsoft.Data.Sqlite (>= 8.0.6)
- Npgsql (>= 8.0.3)
- SqlKata (>= 2.4.0)
- SqlKata.Execution (>= 2.4.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Beztek.Facade.Sql:
Package | Downloads |
---|---|
Beztek.Facade.Cache
API facade over various distributed and non-distributed caches |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.1.3 | 650 | 9/5/2024 |