CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder
9.0.0-beta.71
Prefix Reserved
See the version list below for details.
dotnet add package CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder --version 9.0.0-beta.71
NuGet\Install-Package CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder -Version 9.0.0-beta.71
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder" Version="9.0.0-beta.71" />
paket add CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder --version 9.0.0-beta.71
#r "nuget: CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder, 9.0.0-beta.71"
// Install CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder as a Cake Addin #addin nuget:?package=CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder&version=9.0.0-beta.71&prerelease // Install CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder as a Cake Tool #tool nuget:?package=CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder&version=9.0.0-beta.71&prerelease
CommunityToolkit.Hosting.Azure.DataApiBuilder
Overview
This is a .NET Aspire Integration to run Data API Builder as container. Data API Builder generate REST and GraphQL endpoints performing CRUD (Create, Read, Update, Delete) operations against a database.
Usage
var builder = DistributedApplication.CreateBuilder(args);
// Add Data API Builder using dab-config.json
var dab = builder.AddDataAPIBuilder("dab")
.WithReference(sqlDatabase)
.WaitFor(sqlServer);
builder.Build().Run();
Configuration
name
- The name of the resource.configFilePath
- The path to the config file for Data API Builder. Defaults todab-config.json
.port
- The port number for the Data API Builder container. Defaults tonull
so that Aspire can assign a random port.
Data API Builder Container Image Configuration
The default Data API Builder container image is mcr.microsoft.com/azure-data-api-builder/azure-data-api-builder:1.2.11
.
You can specify a different registry/image/tag by using the WithImageRegistry
/WithImage
/WithImageTag
methods:
var dab = builder.AddDataAPIBuilder("dab")
.WithImageRegistry("mcr.microsoft.com")
.WithImage("azure-databases/data-api-builder")
.WithImageTag("latest");
Database Configuration
In the example we are using a generated password for the database and are not persisting the data. In a production scenario, you probably want to specify the password and persist the data so it does not get lost when the container is restarted. Here is an example of how you can configure the database:
// Add a SQL Server container
var sqlPassword = builder.AddParameter("sql-password");
var sqlServer = builder
.AddSqlServer("sql", sqlPassword)
.WithDataVolume("MyDataVolume");
var sqlDatabase = sqlServer.AddDatabase("your-database-name");
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. |
-
net8.0
- Aspire.Hosting (>= 9.0.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 |
---|---|---|
9.0.1-beta.77 | 0 | 11/15/2024 |
9.0.0 | 0 | 11/15/2024 |
9.0.0-beta.76 | 0 | 11/14/2024 |
9.0.0-beta.75 | 16 | 11/14/2024 |
9.0.0-beta.74 | 20 | 11/14/2024 |
9.0.0-beta.73 | 22 | 11/14/2024 |
9.0.0-beta.72 | 24 | 11/14/2024 |
9.0.0-beta.71 | 29 | 11/13/2024 |
9.0.0-beta.70 | 35 | 11/13/2024 |
9.0.0-beta.69 | 26 | 11/13/2024 |
9.0.0-beta.68 | 26 | 11/13/2024 |
9.0.0-beta.67 | 28 | 11/13/2024 |
9.0.0-beta.66 | 31 | 11/13/2024 |
9.0.0-beta.63 | 32 | 11/12/2024 |
9.0.0-beta.54 | 38 | 10/31/2024 |
1.0.0-beta.60 | 42 | 11/11/2024 |
1.0.0-beta.58 | 38 | 11/4/2024 |
1.0.0-beta.57 | 33 | 11/1/2024 |
1.0.0-beta.56 | 32 | 11/1/2024 |
1.0.0-beta.55 | 32 | 11/1/2024 |