MartinCostello.SqlLocalDb
4.0.0
dotnet add package MartinCostello.SqlLocalDb --version 4.0.0
NuGet\Install-Package MartinCostello.SqlLocalDb -Version 4.0.0
<PackageReference Include="MartinCostello.SqlLocalDb" Version="4.0.0" />
<PackageVersion Include="MartinCostello.SqlLocalDb" Version="4.0.0" />
<PackageReference Include="MartinCostello.SqlLocalDb" />
paket add MartinCostello.SqlLocalDb --version 4.0.0
#r "nuget: MartinCostello.SqlLocalDb, 4.0.0"
#addin nuget:?package=MartinCostello.SqlLocalDb&version=4.0.0
#tool nuget:?package=MartinCostello.SqlLocalDb&version=4.0.0
SQL LocalDB Wrapper
SQL LocalDB Wrapper is a .NET library providing interop with the Microsoft SQL Server LocalDB Instance API from managed code using .NET APIs.
Introduction
This library exposes types that wrap the native SQL LocalDB Instance API to perform operations on SQL LocalDB such as for managing instances (create, delete, start, stop) and obtaining SQL connection strings for existing instances.
Microsoft SQL Server LocalDB 2012 and later is supported for both x86 and x64 on Microsoft Windows.
While the library can be compiled and referenced in .NET applications on non-Windows operating
systems, SQL LocalDB is only supported on Windows. Non-Windows Operating Systems can query to
determine that the SQL LocalDB Instance API is not installed, but other usage will cause a
PlatformNotSupportedException
to be thrown.
Basic Example
using MartinCostello.SqlLocalDb;
using var localDB = new SqlLocalDbApi();
ISqlLocalDbInstanceInfo instance = localDB.GetOrCreateInstance("MyInstance");
ISqlLocalDbInstanceManager manager = instance.Manage();
if (!instance.IsRunning)
{
manager.Start();
}
using SqlConnection connection = instance.CreateConnection();
connection.Open();
// Use the SQL connection...
manager.Stop();
Feedback
Any feedback or issues for this package can be added to the issues in GitHub.
License
This package is licensed under the Apache 2.0 license.
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. |
.NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.2
- Microsoft.Data.SqlClient (>= 6.0.2)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
-
net8.0
- Microsoft.Data.SqlClient (>= 6.0.2)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
NuGet packages (8)
Showing the top 5 NuGet packages that depend on MartinCostello.SqlLocalDb:
Package | Downloads |
---|---|
Luxoft.Framework.AutomationCore
Package Description |
|
IsolatedSqlDb
Package Description |
|
CSharpSqlTests
A simple framework for running sql tests against a temprary localdb instance, optionally deploying a dacpac, using a nice fluent c# api |
|
Alethic.SqlServer.Deployment
Package Description |
|
FlakEssentials.SqlEx
Package Description |
GitHub repositories (4)
Showing the top 4 popular GitHub repositories that depend on MartinCostello.SqlLocalDb:
Repository | Stars |
---|---|
ardalis/Specification
Base class with tests for adding specifications to a DDD model
|
|
MoonStorm/FastCrud
fast .NET ORM for strongly typed people
|
|
SQLStreamStore/SQLStreamStore
Stream Store library targeting RDBMS based implementations for .NET
|
|
lithnet/access-manager
Access Manager provides web-based access to local admin (LAPS) passwords, BitLocker recovery keys, and just-in-time administrative access to Windows computers in a modern, secure, and user-friendly way.
|
See https://github.com/martincostello/sqllocaldb/releases/tag/v4.0.0 for details.