SujaySarma.Data.SqlServer
9.5.0
dotnet add package SujaySarma.Data.SqlServer --version 9.5.0
NuGet\Install-Package SujaySarma.Data.SqlServer -Version 9.5.0
<PackageReference Include="SujaySarma.Data.SqlServer" Version="9.5.0" />
<PackageVersion Include="SujaySarma.Data.SqlServer" Version="9.5.0" />
<PackageReference Include="SujaySarma.Data.SqlServer" />
paket add SujaySarma.Data.SqlServer --version 9.5.0
#r "nuget: SujaySarma.Data.SqlServer, 9.5.0"
#addin nuget:?package=SujaySarma.Data.SqlServer&version=9.5.0
#tool nuget:?package=SujaySarma.Data.SqlServer&version=9.5.0
SujaySarma.Data.SqlServer
This is a .NET library that helps you manipulate objects and data in SQL Server databases. It supports on-prem SQL Servers, MSDE, LocalDB, named instances, SQL Azure and SQL on Linux scenarios.
API
This library provides the following public-surface API:
Attributes
Name | Description |
---|---|
Table | Map a class, structure or record to a database table. |
TableColumn | Map a property or field to a database table column. |
In addition, this library supports creating a table for a .NET object. To support this, you would need to provide column type constraints (such as marking them as IDENTITY or providing precision/scale values). This is achieved through the following attributes:
Name | Description |
---|---|
ColumnPrecision | Specifies the precision value. |
ColumnScale | Specifies the scale of precision. |
Identity | Marks a column as an IDENTITY column and provides the SEED and INCREMENT values. |
How to use
- Decorate your classes with the
TableAttribute
to indicate that they represent a table in SQL Server. - Decorate the properties or fields in the classes with the
TableColumnAttribute
to indicate that they represent columns in the table. If you need to support the SDK's CreateTable functionality, add the required attributes from the second table of attributes above. - Use the
SqlContext
class to interact with SQL Server. This class provides methods for performing both DDL and DML operations on the tables, in both synchronous and asynchronous modes.
This library contains other members marked "public" that are only intended for use by a library implementing a data access mechanism. These members are part of the internal implementation and should not be used directly by consumers of the library. They are subject to change without notice and may not be available in future versions of the library. Please see the code and documentation within SujaySarma.Data.* data access implementation libraries.*
Copyright (c) 2025 and beyond, Sujay V. Sarma. All rights reserved.
Licensed under the MIT License. See LICENSE file in the project root for full license information.
Library authored and maintained by: Sujay V. Sarma.
Issues/Feedback/Suggestions/Feature requests: Please create an issue on the GitHub repository.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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 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 was computed. 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 was computed. 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. |
-
net6.0
- SujaySarma.Data.Core (>= 9.5.0)
- System.Data.SqlClient (>= 4.9.0)
-
net8.0
- Microsoft.Data.SqlClient (>= 6.0.2)
- SujaySarma.Data.Core (>= 9.5.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.