--- applyTo: "Fuchs/**,Fuchs_DataService/**,OCORE/**,OCORE_web/**,OCORE_web_pdf/**" --- # OCORE Libraries Instructions ## Preferred Libraries - Make use of **OCORE** / **OCORE_web** libraries wherever possible for common tasks: logging, configuration, data access, web helpers, and security. - For PDF-related work, prefer **OCORE_web_pdf** / OCORE PDF functions over rewriting from scratch. - **Do not use OCMS or OCMS_sharp.** Use only OCORE or OCORE_web. In particular, never use `OCMS.ocms_debug.debug_log`. ## Common OCORE Entry Points | Area | Namespace / helper | |------|--------------------| | SQL access | `OCORE.SQL.sql` (`getSQLDatatable_async`, `getSQLValue_async`, `SQL_VarChar`, ...) | | Async MVC/JSON | `OCORE.web.mvc_helper_async` (`JSONAsync`, ...) | | Security | `OCORE.security` (`DatabaseSecurity`, ...) | | Dictionaries/commons | `OCORE.commons`, `OCORE.OCORE_dictionaries` | | Web bootstrapping | `OCORE_web` app-builder / middleware helpers | | Secret management | `OCORE_web.Secrets.SecretManagementWebExtensions` | ## SQL Helper Conventions - Pass parameters using `SQL_VarChar(...)` and the controller `StdParamlist(...)` helpers (auto-injects `@authuser`). - Always pass `Security: DbSec` and `options: SqlOpt(fn, id, code)` to the OCORE SQL helpers. - Prefer the `_async` variants for all database I/O. ## Repository Sync - OCORE, OCORE_web, OCORE_web_pdf, and OCORE_Charting are separate git repositories pulled alongside Fuchs. - After pulling OCORE* updates, rebuild and re-run tests, and re-check shared dependency versions (e.g., MailKit/MimeKit) for `NU1605` downgrade conflicts. ## ImageSharp (used transitively by OCORE/OCORE_web) - See `imagesharp.instructions.md` for license handling and the v4.0.0 namespace changes.