- 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
11 lines
500 B
Bash
Executable File
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 -- "$@"
|