Files
db-subclass-to-dto/scripts/run-console.sh
T
mostalive ec9586c316 Throw ObjectNotFoundException from FindRequired; add run-console wrappers
- DbBase.FindRequired / Client.FindByNameRequired now throw the
  domain-specific ObjectNotFoundException (NHibernate lineage; Rails
  equivalent: ActiveRecord::RecordNotFound) on a lookup miss; the
  no-context case stays InvalidOperationException (configuration error)
- Console demo catches the new type; tests (18)/(21) assert it,
  (19)/(23) keep InvalidOperationException with rationale comments
- scripts/run-console.sh delegates to dotnet.sh; run-console.ps1 is
  the Windows/PowerShell counterpart (mise-first, repo-root cd)

Yak: objectnotfoundexception-run-console-wrappers-3p8b
2026-09-14 22:39:21 +01:00

11 lines
500 B
Bash
Executable File

#!/usr/bin/env bash
# Run the Before.Console demo app (src/Before.Console/Program.cs).
# Delegates to scripts/dotnet.sh — see there for why the wrapper exists
# (mise-installed dotnet, DOTNET_CLI_HOME, run from repo root).
#
# Usage: scripts/run-console.sh [app args]
# scripts/run-console.sh # no args
# scripts/run-console.sh -- --verbose # args are passed to the program
set -euo pipefail
exec "$(cd "$(dirname "$0")" && pwd)/dotnet.sh" run --project src/Before.Console -- "$@"