Ferrous Music Store API

All Types / MusicStore.Api.Services

class StoreService

public sealed partial class StoreService

Exception-free, instrumented store service combining Result<T, TError>, linear [Typestate] checkout, ScopeGuard rollback, and structured TaskScope.

Methods

public Task<Option<Album>> FindAlbumAsync(AlbumId id, CancellationToken ct = default)

Finds an album by its strongly-typed ID without returning null.

public async Task<CatalogSummary> GetCatalogSummaryAsync(CancellationToken ct = default)

Computes a catalog summary using structured concurrency (TaskScope) so all child tasks are guaranteed to complete or cancel before returning.

public async Task<Result<Order, StoreError>> CheckoutAsync(CheckoutRequest request, CancellationToken ct = default)

Executes linear typestate checkout with ScopeGuard rollback protection.