# withDataVolume

- Module: [CommunityToolkit.Aspire.Hosting.DbGate](/reference/api/typescript/communitytoolkit.aspire.hosting.dbgate.md)
- Version: `13.4.0`
- Kind: `method`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire)

Adds a named volume for the data folder to a DbGate container resource.

## Definition

```typescript
interface DbGateContainerResource {
  // ... omitted for brevity
  withDataVolume(
    name?: string,
    isReadOnly?: boolean): DbGateContainerResource
}
```

## Parameters

- `name` (`string`) `optional`
- `isReadOnly` (`boolean`) `optional` `= False`

## Returns

[DbGateContainerResource](/reference/api/typescript/communitytoolkit.aspire.hosting.dbgate/dbgatecontainerresource.md) `builder`

## Applies to

- [DbGateContainerResource](/reference/api/typescript/communitytoolkit.aspire.hosting.dbgate/dbgatecontainerresource.md)
