CA.Blocks.SQLServerDataAccess
3.7.210-prerelease
See the version list below for details.
dotnet add package CA.Blocks.SQLServerDataAccess --version 3.7.210-prerelease
NuGet\Install-Package CA.Blocks.SQLServerDataAccess -Version 3.7.210-prerelease
<PackageReference Include="CA.Blocks.SQLServerDataAccess" Version="3.7.210-prerelease" />
<PackageVersion Include="CA.Blocks.SQLServerDataAccess" Version="3.7.210-prerelease" />
<PackageReference Include="CA.Blocks.SQLServerDataAccess" />
paket add CA.Blocks.SQLServerDataAccess --version 3.7.210-prerelease
#r "nuget: CA.Blocks.SQLServerDataAccess, 3.7.210-prerelease"
#:package CA.Blocks.SQLServerDataAccess@3.7.210-prerelease
#addin nuget:?package=CA.Blocks.SQLServerDataAccess&version=3.7.210-prerelease&prerelease
#tool nuget:?package=CA.Blocks.SQLServerDataAccess&version=3.7.210-prerelease&prerelease
This Package is a extension to the DataAccess Blocks targeting the Sqllite provider
Quick example
poco object
public class ExampleSysObject
{
public int Id { get; set; }
public string Name { get; set; }
public string XType { get; set; }
public DateTime CreateDate { get; set; }
}
The Data access class
public class YourDataAccessClass : SqlServerDataAccess
{
public YourDataAccessClass() :
base( new SimpleConnectionStringDataAccessConfig("Server=(local);Database=tempdb;Integrated Security = SSPI; TrustServerCertificate=True"))
{
}
internal string ReadSysObjectsOfTypeSql => @"
SELECT TOP 10 id as Id, name as Name, xtype as XType, crdate as CreateDate
FROM sysobjects
WHERE xtype = @xtype";
public IList<ExampleSysObject> ReadSysObjectsOfType(string xtype)
{
var cmd = CreateTextCommand(ReadSysObjectsOfTypeSql)
.WithParameter(xtype.ToSqlParameter("@xtype"));
return Execute(cmd).ToListOf<ExampleSysObject>();
}
public async Task<IList<ExampleSysObject>> ReadSysObjectsOfTypeAsync(string xtype)
{
var cmd = CreateTextCommand(ReadSysObjectsOfTypeSql)
.WithParameter(xtype.ToSqlParameter("@xtype"));
return await ExecuteAsync(cmd).ToListOf<ExampleSysObject>();
}
public async Task<IList<ExampleSysObject>> ReadSysObjectsOfTypeWithSqlBuilderAsync(string xtype)
{
var sqlBuilder = new SafeSqlBuilder();
sqlBuilder.AddSql($"SELECT TOP 10 id as Id, name as Name, xtype as XType, crdate as CreateDate FROM sysobjects WHERE xtype = {xtype:@xtype}");
// this will build a valid sql statement with full parementer support.
// the sql will be "SELECT TOP 10 id as Id, name as Name, xtype as XType, crdate as CreateDate FROM sysobjects WHERE xtype = @xtype}" with the xtype passed in as a parameter
return await ExecuteAsync(sqlBuilder.BuildSqlCommand()).ToListOf<ExampleSysObject>();
}
}
Calling the data access class
var instance = new YourDataAccessClass();
var results = instance.ReadSysObjectsOfType("U");
foreach (var o in results)
{
Console.WriteLine($"{o.Id},{o.Name},{o.Type},{o.CreateDate}");
}
| Product | Versions 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 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
| .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. |
-
.NETStandard 2.0
- CA.Blocks.DataAccess (>= 3.7.210-prerelease)
- Microsoft.Data.SqlClient (>= 6.1.3)
-
net10.0
- CA.Blocks.DataAccess (>= 3.7.210-prerelease)
- Microsoft.Data.SqlClient (>= 6.1.3)
-
net8.0
- CA.Blocks.DataAccess (>= 3.7.210-prerelease)
- Microsoft.Data.SqlClient (>= 6.1.3)
-
net9.0
- CA.Blocks.DataAccess (>= 3.7.210-prerelease)
- Microsoft.Data.SqlClient (>= 6.1.3)
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.7.212-prerelease | 92 | 1/15/2026 |
| 3.7.210-prerelease | 178 | 12/26/2025 |
| 3.6.207-prerelease | 203 | 12/4/2025 |
| 3.6.205-prerelease | 255 | 11/30/2025 |
| 3.6.202-prerelease | 183 | 11/27/2025 |
| 3.6.200 | 310 | 8/22/2025 |
| 3.6.199-prerelease | 187 | 7/27/2025 |
| 3.5.197-prerelease | 276 | 7/20/2025 |
| 3.5.195 | 992 | 5/14/2025 |
| 3.5.194-prerelease | 274 | 5/14/2025 |
| 3.5.192-prerelease | 161 | 5/3/2025 |
| 3.5.190-alpha | 231 | 4/13/2025 |
| 3.5.187-prerelease | 175 | 4/13/2025 |
| 3.4.172-prerelease | 140 | 11/29/2024 |
| 3.4.160 | 1,178 | 11/17/2024 |
| 3.4.159-prerelease | 134 | 10/24/2024 |
| 3.4.157 | 1,093 | 8/8/2024 |
| 3.4.156-prerelease | 134 | 8/4/2024 |
| 3.4.154-prerelease | 118 | 8/4/2024 |
| 3.4.152-prerelease | 150 | 8/4/2024 |
v3.7
- Added build packages for .NET 10
- Bump the Microsoft.Data.SqlClient to use 6.1.3"
v3.6
- Bump the Microsoft.Data.SqlClient to use 6.1
- Add Ctor to SafeSqlBuilder to allow building the statement on create.
v.3.5
- Added build packages for .NET 9
- Added SafeSqlBuilder to help build on sql statements based on Interpolated String with full parameter support
- Add SqlParameterHelper to help build sets of Sqlparamters with out using all the vebose synatax of using ToSqlParameter()