DatabaseSharp 1.6.3
dotnet add package DatabaseSharp --version 1.6.3
NuGet\Install-Package DatabaseSharp -Version 1.6.3
<PackageReference Include="DatabaseSharp" Version="1.6.3" />
<PackageVersion Include="DatabaseSharp" Version="1.6.3" />
<PackageReference Include="DatabaseSharp" />
paket add DatabaseSharp --version 1.6.3
#r "nuget: DatabaseSharp, 1.6.3"
#:package DatabaseSharp@1.6.3
#addin nuget:?package=DatabaseSharp&version=1.6.3
#tool nuget:?package=DatabaseSharp&version=1.6.3
<p align="center"> <img src="https://github.com/user-attachments/assets/4b024dea-dbd3-475c-9a7b-faf2869d5c8f" width="200" height="200" /> </p>
DatabaseSharp
This is a project to introduce simpler type conversion when communicating with a database.
The library here is designed to only communicate through STPs, since it is considered more secure than free SQL.
An example of how this works can be seen below:
var client = new DBClient("<--Database Connection String Here-->");
var dataset = await client.ExecuteAsync("some-stp");
var table = dataset[0];
var row = table[0];
int someValue = row.GetValue<int>("COL_NAME");
You can also deserialize directly into class objects like this:
public class SomeClass
{
[DatabaseSharp(ColumnName = "PK_NAME")]
public string Name { get; set; }
[DatabaseSharp(ColumnName = "ACT_VALUE")]
public int Value { get; set; }
}
var client = new DBClient("<--Database Connection String Here-->");
var dataset = await client.ExecuteAsync("some-stp");
var table = dataset[0];
var row = table[0];
SomeClass filled = row.Fill<SomeClass>();
These are just the methods on the row level. However you can also use these on the Table level, where it will instead make a list of the items, as such:
var client = new DBClient("<--Database Connection String Here-->");
var dataset = await client.ExecuteAsync("some-stp");
var table = dataset[0];
List<int> someValue = table.GetAllValues<int>("COL_NAME");
The project is available as a package on the NuGet Package Manager.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Data.SqlClient (>= 6.1.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DatabaseSharp:
| Package | Downloads |
|---|---|
|
ActFlow.Integrations.DatabaseSharp
DatabaseSharp workflow activities for ActFlow |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.6.3 | 435 | 12/17/2025 |
| 1.6.2 | 270 | 12/17/2025 |
| 1.6.1 | 119 | 12/12/2025 |
| 1.6.0 | 198 | 12/4/2025 |
| 1.5.0 | 236 | 10/6/2025 |
| 1.4.5 | 206 | 9/29/2025 |
| 1.4.4 | 187 | 9/24/2025 |
| 1.4.3 | 311 | 9/18/2025 |
| 1.4.2 | 305 | 9/18/2025 |
| 1.4.1 | 313 | 9/16/2025 |
| 1.4.0 | 242 | 8/8/2025 |
| 1.3.9 | 241 | 8/8/2025 |
| 1.3.8 | 481 | 7/25/2025 |
| 1.3.7 | 248 | 6/5/2025 |
| 1.3.6 | 190 | 5/28/2025 |
| 1.3.5 | 308 | 5/14/2025 |
| 1.3.4 | 263 | 5/14/2025 |
| 1.3.3 | 199 | 4/30/2025 |
| 1.3.2 | 543 | 3/26/2025 |
| 1.3.1 | 218 | 3/20/2025 |