CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder 9.0.0-beta.71

Prefix Reserved
This is a prerelease version of CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder.
There is a newer version of this package available.
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                
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="CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder" Version="9.0.0-beta.71" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
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"                
#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.
// 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 to dab-config.json.
  • port - The port number for the Data API Builder container. Defaults to null 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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