CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder
9.0.0-beta.68
Prefix Reserved
See the version list below for details.
dotnet add package CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder --version 9.0.0-beta.68
NuGet\Install-Package CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder -Version 9.0.0-beta.68
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder" Version="9.0.0-beta.68" />
paket add CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder --version 9.0.0-beta.68
#r "nuget: CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder, 9.0.0-beta.68"
// Install CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder as a Cake Addin #addin nuget:?package=CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder&version=9.0.0-beta.68&prerelease // Install CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder as a Cake Tool #tool nuget:?package=CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder&version=9.0.0-beta.68&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.88 | 29 | 11/27/2024 |
9.0.1-beta.87 | 27 | 11/27/2024 |
9.0.1-beta.86 | 40 | 11/27/2024 |
9.0.1-beta.84 | 36 | 11/24/2024 |
9.0.1-beta.83 | 36 | 11/22/2024 |
9.0.1-beta.82 | 41 | 11/21/2024 |
9.0.1-beta.81 | 29 | 11/19/2024 |
9.0.1-beta.80 | 26 | 11/19/2024 |
9.0.1-beta.79 | 31 | 11/19/2024 |
9.0.1-beta.77 | 36 | 11/15/2024 |
9.0.0 | 79 | 11/15/2024 |
9.0.0-beta.76 | 33 | 11/14/2024 |
9.0.0-beta.75 | 31 | 11/14/2024 |
9.0.0-beta.74 | 32 | 11/14/2024 |
9.0.0-beta.73 | 30 | 11/14/2024 |
9.0.0-beta.72 | 31 | 11/14/2024 |
9.0.0-beta.71 | 31 | 11/13/2024 |
9.0.0-beta.70 | 37 | 11/13/2024 |
9.0.0-beta.69 | 31 | 11/13/2024 |
9.0.0-beta.68 | 28 | 11/13/2024 |
9.0.0-beta.67 | 30 | 11/13/2024 |
9.0.0-beta.66 | 36 | 11/13/2024 |
9.0.0-beta.63 | 41 | 11/12/2024 |
9.0.0-beta.54 | 46 | 10/31/2024 |
1.0.0-beta.60 | 44 | 11/11/2024 |
1.0.0-beta.58 | 40 | 11/4/2024 |
1.0.0-beta.57 | 35 | 11/1/2024 |
1.0.0-beta.56 | 34 | 11/1/2024 |
1.0.0-beta.55 | 34 | 11/1/2024 |