SqlExtensionsAspire 94.2025.802.1154
dotnet add package SqlExtensionsAspire --version 94.2025.802.1154
NuGet\Install-Package SqlExtensionsAspire -Version 94.2025.802.1154
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="SqlExtensionsAspire" Version="94.2025.802.1154" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SqlExtensionsAspire" Version="94.2025.802.1154" />
<PackageReference Include="SqlExtensionsAspire" />
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 SqlExtensionsAspire --version 94.2025.802.1154
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SqlExtensionsAspire, 94.2025.802.1154"
#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 SqlExtensionsAspire@94.2025.802.1154
#: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=SqlExtensionsAspire&version=94.2025.802.1154
#tool nuget:?package=SqlExtensionsAspire&version=94.2025.802.1154
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SqlExtensionsAspire
Extension methods for .NET Aspire SQL Server hosting that add SQL command execution, script execution, and SQLPad integration capabilities.
Features
- SQL Command Execution: Execute ad-hoc SQL commands
- SQL Script Execution: Execute SQL scripts with GO batch separators
- SQLPad Integration: Web-based SQL editor for database management
- Full Aspire Integration: Seamlessly integrates with .NET Aspire
Installation
Install via NuGet:
dotnet add package SqlExtensionsAspire
Usage
Basic Setup
using SqlExtensionsAspire;
var builder = DistributedApplication.CreateBuilder(args);
var sqlserver = builder.AddSqlServer("sqlserver");
var database = sqlserver.AddDatabase("mydatabase");
SQL Command Execution
var database = sqlserver.AddDatabase("mydatabase")
.WithSqlCommand("clear-data", "DELETE FROM Users WHERE IsTemporary = 1")
.WithSqlCommand("seed-data", "INSERT INTO Users (Name, Email) VALUES ('Admin', 'admin@example.com')");
SQL Script Execution
var createTableScript = @"
CREATE TABLE Users (
Id INT IDENTITY(1,1) PRIMARY KEY,
Name NVARCHAR(100) NOT NULL,
Email NVARCHAR(255) NOT NULL
);
GO
CREATE INDEX IX_Users_Email ON Users(Email);
GO
";
var database = sqlserver.AddDatabase("mydatabase")
.ExecuteSqlServerScripts(createTableScript);
SQLPad Integration
var database = sqlserver.AddDatabase("mydatabase")
.WithSqlPadViewerForDB(sqlserver);
Requirements
- .NET 9.0 or later
- .NET Aspire 9.2.0 or later
- SQL Server (via Aspire.Hosting.SqlServer)
License
MIT License - see LICENSE.txt for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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 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.
-
net9.0
- Aspire.Hosting.SqlServer (>= 9.4.0)
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 |
---|---|---|
94.2025.802.1154 | 75 | 8/3/2025 |
93.2025.208.1818 | 30 | 8/2/2025 |
Initial release with SQL command execution, script execution, and SQLPad integration for .NET Aspire.