DatabaseLibraryMDS 3.0.9
dotnet add package DatabaseLibraryMDS --version 3.0.9
NuGet\Install-Package DatabaseLibraryMDS -Version 3.0.9
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="DatabaseLibraryMDS" Version="3.0.9" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DatabaseLibraryMDS" Version="3.0.9" />
<PackageReference Include="DatabaseLibraryMDS" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DatabaseLibraryMDS --version 3.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DatabaseLibraryMDS, 3.0.9"
#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.
#:package DatabaseLibraryMDS@3.0.9
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DatabaseLibraryMDS&version=3.0.9
#tool nuget:?package=DatabaseLibraryMDS&version=3.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
About
The DatabaseLibraryMDS is a library for accessing Sql Server databases using the Microsoft.Data.SqlClient.
Built with .NET 8 the DatabaseLibraryMDS library is for performing CRUD operations on a SQL Server database with minimal code for the developer.
Key Features
- Makes reading and writing data to and from a database easier with less coding
- Automatically maps columns to properties when retrieving data
- Converts returning values according to the data type of the property
- Supports setting the query timeout
- Supports Async calls
- Supports Transactions
- Supports logging errors to the Windows Event Log
- Supports Unit Testing
How to Use
Executes a query that returns a List<Email>
public List<Email> Email(string connectionString, string parameter)
{
try
{
using (var ss = new SqlServer(connectionString, CommandType.StoredProcedure))
{
string queryString = "Runbook.dbo.cspGetEmailByEmailId";
ss.AddParameter("@parameter", parameter);
return ss.ExecuteReader<Email>(queryString);
}
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
}
Executes an Insert statement that returns a Guid for the record ID
NOTE: The stored procedure will need to OUTPUT the new ID
public Guid Email(string connectionString, Email Email)
{
try
{
using (var ss = new SqlServer(connectionString, CommandType.StoredProcedure))
{
string spName = "Runbook.dbo.cspAddEmail";
return ss.ExecuteForGuid(spName, Email);
}
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Microsoft.Data.SqlClient (>= 6.0.2)
- System.Diagnostics.EventLog (>= 9.0.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.