1.5 KiB
1.5 KiB
AyCode.Core — Domain Rules
This is the single source of truth for domain rules. Do not duplicate these elsewhere. For detailed docs see:
README.md→docs/
Key Abstractions
- IId is the foundation interface — almost every entity implements it. Always preserve ID integrity.
- Generic entity hierarchy: Interfaces (
AyCode.Interfaces) → Entities (AyCode.Entities) → Models (AyCode.Models). Entities are abstract generics; concrete types live in consuming projects. - TrackingState enum (Added/Modified/Deleted/Unchanged) drives client-side change tracking, not EF Core.
Serialization
- Toon (Token-Oriented Object Notation) — primary goal is LLM accuracy. @meta/@data sections.
- AcBinary — primary goal is speed. Two-phase scan+serialize, reference tracking, string interning.
- AcJson — Newtonsoft.Json wrapper with $id/$ref, IId-based reference resolution, and chain API.
Critical Warnings
- PasswordHasher — PBKDF2-HMAC-SHA512. Do NOT modify the salt logic or iteration count — existing passwords become unverifiable.
- MeasuringStatus.Finnished — intentional legacy typo in consuming projects. Do NOT fix the spelling.
- LogLevel enum values — synchronized with database. Do NOT renumber.
Conventions
- Do not suggest removal/rollback as a solution — find a fix for the problem.
- Extension methods over instance methods for CRUD operations (see DbSets pattern).
- Session pattern for reads, Transaction pattern for writes (see DataLayers).