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
This commit is contained in:
@@ -26,6 +26,16 @@ agent/sandbox shells, and SDK 10 additionally fails without
|
||||
scripts/dotnet.sh build db-subclass-to-dto.sln
|
||||
scripts/dotnet.sh test db-subclass-to-dto.sln
|
||||
scripts/run-tests.sh # full test suite, from repo root
|
||||
scripts/run-console.sh # run the Before.Console demo (bash; delegates
|
||||
# to dotnet.sh); app args go after `--`
|
||||
```
|
||||
|
||||
Windows/PowerShell counterpart:
|
||||
|
||||
```powershell
|
||||
scripts\run-console.ps1 # run the Before.Console demo; app args go
|
||||
# directly (the script inserts `--` for
|
||||
# dotnet run); needs no DOTNET_CLI_HOME setup
|
||||
```
|
||||
|
||||
The wrappers cd to the repo root (the test runner must run from the parent
|
||||
|
||||
Reference in New Issue
Block a user