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

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.66                
NuGet\Install-Package CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder -Version 9.0.0-beta.66                
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.66" />                
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.66                
#r "nuget: CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder, 9.0.0-beta.66"                
#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.66&prerelease

// Install CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder as a Cake Tool
#tool nuget:?package=CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder&version=9.0.0-beta.66&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.92 0 11/30/2024
9.0.1-beta.91 0 11/30/2024
9.0.1-beta.90 27 11/29/2024
9.0.1-beta.89 31 11/29/2024
9.0.1-beta.88 33 11/27/2024
9.0.1-beta.87 31 11/27/2024
9.0.1-beta.86 40 11/27/2024
9.0.1-beta.84 37 11/24/2024
9.0.1-beta.83 37 11/22/2024
9.0.1-beta.82 42 11/21/2024
9.0.1-beta.81 30 11/19/2024
9.0.1-beta.80 27 11/19/2024
9.0.1-beta.79 31 11/19/2024
9.0.1-beta.77 36 11/15/2024
9.0.0 81 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 40 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