ROCBNDbContext
✓ Published0🌍 Public
DDeepakumar
Last edited Jul 8, 2021
Created on Jul 8, 2021
This example shows a read-only database context for the ROCBN domain, mapping three entities—`Entities`, `EntityBusinessActivities`, and `EntityOtherInformation`—to their corresponding tables in the `ent` schema using Microsoft's Entity Framework Core. The code defines table mappings, indexes on foreign-key columns, and row-version concurrency tokens. It also overrides `SaveChanges()` to throw an exception, enforcing a read-only access pattern. Relationships include a one-to-many from `Entity` to business activities and a one-to-one link to other information, both configured via the `ModelBuilder` API.
AI-generated description