# DbGateBuilderExtensions

- Kind: `class`
- Package: [CommunityToolkit.Aspire.Hosting.DbGate](/reference/api/csharp/communitytoolkit.aspire.hosting.dbgate.md)
- Version: `13.1.1`
- Namespace: `Aspire.Hosting`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/67afcca30f02c18687f9c5219313710af9706630/src/CommunityToolkit.Aspire.Hosting.DbGate/DbGateBuilderExtensions.cs)

Provides extension methods for DbGate resources to an `Hosting.IDistributedApplicationBuilder`.

## Definition

```csharp
namespace Aspire.Hosting;

public static class DbGateBuilderExtensions
{
    // ...
}
```

## Methods

- [AddDbGate(IDistributedApplicationBuilder, string, int?)](/reference/api/csharp/communitytoolkit.aspire.hosting.dbgate/dbgatebuilderextensions/methods.md#adddbgate-idistributedapplicationbuilder-string-int) : `IResourceBuilder<DbGateContainerResource>` `extension` -- Adds a DbGate container resource to the application.
- [WithDataBindMount(IResourceBuilder<DbGateContainerResource>, string, bool)](/reference/api/csharp/communitytoolkit.aspire.hosting.dbgate/dbgatebuilderextensions/methods.md#withdatabindmount-iresourcebuilder-dbgatecontainerresource-string-bool) : `IResourceBuilder<DbGateContainerResource>` `extension` -- Adds a bind mount for the data folder to a DbGate container resource.
- [WithDataVolume(IResourceBuilder<DbGateContainerResource>, string?, bool)](/reference/api/csharp/communitytoolkit.aspire.hosting.dbgate/dbgatebuilderextensions/methods.md#withdatavolume-iresourcebuilder-dbgatecontainerresource-string-bool) : `IResourceBuilder<DbGateContainerResource>` `extension` -- Adds a named volume for the data folder to a DbGate container resource.
- [WithHostPort(IResourceBuilder<DbGateContainerResource>, int?)](/reference/api/csharp/communitytoolkit.aspire.hosting.dbgate/dbgatebuilderextensions/methods.md#withhostport-iresourcebuilder-dbgatecontainerresource-int) : `IResourceBuilder<DbGateContainerResource>` `extension` -- Configures the host port that the DbGate resource is exposed on instead of using randomly assigned port.
