page:recipes:asset library:asp net core:relational workflow

Host asset library with ASP.NET Core: relational workflow state

Deploy an asset library built with ASP.NET Core on Ample using the transactional workflows pattern. Compute runs the app in an isolated microVM behind a public HTTPS URL, a managed PostgreSQL 16 database is auto-provisioned and injected as DATABASE_URL. Verified on ASP.NET Core: an optimistic version check and an event row written in the same transaction, a stale update rejected, and a history query over the application-owned events (history=2 conflict=rejected). Not separately tested: your domain records, validation rules and concurrency policy; treat the asset library-specific behavior as your application code.

Representative Queries

Resource Requirements

Infrastructure Requirements

  1. Compute

    • Status: verified

    • Summary: Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.

    • Canonical Path: /discover/primitive/compute

  2. Postgres

    • Status: verified

    • Summary: Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when an app needs a database and no DATABASE_URL is supplied.

    • Canonical Path: /discover/primitive/postgres

Prerequisites

Workflow Steps

  1. Build and start

    • Command: dotnet publish -c Release -o out in the builder, then dotnet .dll on the dotnet-10 template with ASPNETCORE_URLS bound to PORT. The server must bind 0.0.0.0 on PORT.
  2. Implement the pattern on PostgreSQL

    • Body: The fixture's module implements transactional workflows: an optimistic version check and an event row written in the same transaction, a stale update rejected, and a history query over the application-owned events (history=2 conflict=rejected). Copy the approach into your schema; keep migrations idempotent and run them with --release-command.
  3. Deploy

    • Command: ample deploy . --name --public
  4. Verify

    • Command: ample logs --kind build

Success Checks

Limitations

Cost Estimate

Example

  1. ASP.NET Core pattern fixture
    • Description: Multi-pattern ASP.NET Core app whose transactional workflows module was checked live.
    • Source Ref: tests/deploy-canaries/asp-net-core-patterns

Evidence Summary

  1. Canary Run: Deployment on Ample was confirmed with passed checks.
  2. Same ASP.NET Core app was successfully deployed with migration.

Last Verified At

2026-09-21T01:15:54Z