Skip to main content

LMS Data Integrity and Transactions

Summary

Source-backed keys, constraints, SaveChanges, outbox, and external-boundary reference.

Audience

Engineering, QA, architecture, security, product, and data-governance reviewers.

Reference Content

Every persisted object has a generated primary identifier. Five relationships are database-enforced cascades; other references are logical only. Eight unique constraints protect selected course, path, enrollment, completion, certificate, outbox, and processed-event identities. Required/length/conversion mappings add selected shape constraints.

No SaveChanges override, explicit BeginTransaction, transaction scope, distributed transaction, concurrency token, row-version mapping, soft-delete filter, or general database exception translation was found. EF applies its normal transaction behavior around a SaveChanges call.

Most endpoints issue one SaveChanges after staging domain, evidence, and outbox changes. Import operations process multiple rows and save once; recognized row errors can coexist with tracked valid changes. Document creation calls the external service before local SaveChanges, so external success can precede local failure without compensation.

Requires confirmation

Production isolation level, retry policy, deadlock handling, backup/recovery, data-retention enforcement, and external reconciliation require confirmation.

Source References

  • microservices/src/training-service/Infrastructure/TrainingDbContext.cs
  • microservices/src/training-service/Api/TrainingEndpoints.cs
  • microservices/src/training-service/Application/DocumentServiceClient.cs
  • microservices/src/training-service/Infrastructure/Persistence.cs

See Also

Keywords

  • LMS database
  • Training persistence
  • Source-backed model

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-17
  • Review cycle: Quarterly