ToolsPack.Sql
3.1.0
dotnet add package ToolsPack.Sql --version 3.1.0
NuGet\Install-Package ToolsPack.Sql -Version 3.1.0
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="ToolsPack.Sql" Version="3.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ToolsPack.Sql --version 3.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ToolsPack.Sql, 3.1.0"
#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 ToolsPack.Sql as a Cake Addin
#addin nuget:?package=ToolsPack.Sql&version=3.1.0
// Install ToolsPack.Sql as a Cake Tool
#tool nuget:?package=ToolsPack.Sql&version=3.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ToolsPack.Sql
This package helps to avoid redundancy when writing ADO.NET codes. It is very tiny and battle tested in production since several years. There won't be any evolution on this package because the ADO.NET interface have been stable for years.
Tips: For a more serious ADO.NET helper: check out the Dapper project. It will help to shorten the ADO.NET codes writing evens more!
- http://www.blackbeltcoder.com/Articles/ado/an-ado-net-sql-helper-class
- I've made an improvement so that we can declare the length of VarChar parameters. It is recommended to always declare length of the VarChar parameters
- http://stackoverflow.com/a/18551053/347051
string qry = "SELECT.. FROM.. WHERE ArtApproved = @Approved AND ArtUpdated > @Updated AND name <> @Foo";
using (AdoHelper db = new AdoHelper(connectionString))
{
using (SqlDataReader rdr = db.ExecDataReader(qry,
"@Approved", true,
"@Foo", "Bazz", 50 //50 is the parameter length to optimize query cache in some case
"@Fuu", "Beuh", //also a varchar parameter, but I do not declare the length (not recommended)
"@Holly", null, //will be replaced by DBNull value
"@Updated", new DateTime(2011, 3, 1)))
{
while (rdr.Read())
{
rdr.GetValue<int?>("views"); //no need to check null value anymore
rdr.GetIntNullable("views2"); //no need to check null value anymore
rdr.GetValue<DateTime?>("lastModified");
rdr.GetDateTimeNulable(5);
}
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. 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 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 is compatible. 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 is compatible. |
.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.
-
.NETStandard 2.0
- System.Data.SqlClient (>= 4.8.6)
-
.NETStandard 2.1
- System.Data.SqlClient (>= 4.8.6)
-
net5.0
- System.Data.SqlClient (>= 4.8.6)
-
net6.0
- System.Data.SqlClient (>= 4.8.6)
-
net7.0
- System.Data.SqlClient (>= 4.8.6)
-
net8.0
- System.Data.SqlClient (>= 4.8.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.1.0 | 98 | 2/8/2024 |
3.0.3 | 90 | 2/8/2024 |
3.0.2 | 84 | 2/8/2024 |
3.0.1 | 424 | 11/27/2022 |
3.0.0 | 1,413 | 7/5/2022 |
2.1.3 | 4,984 | 5/14/2020 |
2.1.2 | 499 | 4/13/2020 |
2.1.1 | 553 | 4/4/2020 |
2.0.1 | 611 | 1/2/2020 |
2.0.0 | 577 | 5/31/2019 |
1.0.1 | 1,556 | 11/24/2015 |
1.0.0.2 | 1,267 | 11/19/2015 |
1.0.0.1 | 1,602 | 11/13/2015 |
1.0.0 | 1,363 | 11/13/2015 |