Individual skill
crestapps-core-entitycore-stores
Skill for the CrestApps.Core.Data.EntityCore persistence backend in CrestApps.Core 2.0. Covers AddEntityCoreSqliteDataStore and AddEntityCoreDataStore with any EF Core provider, EntityCoreDataStoreOptions (TablePrefix, EnforceNamedSourceUniqueness), CrestAppsEntityDbContext and its tables, EntityCoreStoreCommitter, per-feature AddEntityCoreStores on every feature builder including personas and tool instances, the service-collection store methods for web crawlers, file sources, knowledge objects and ingestion item state, generic document catalogs for custom models, binding sources, InitializeEntityCoreSchemaAsync, and extending the model with ICrestAppsModelConfigurer. Use it when a host persists CrestApps.Core data with Entity Framework Core or troubleshoots EF Core stores.
src/CrestApps.AgentSkills/crestapps-core/crestapps-core-entitycore-stores/SKILL.md
Source commit d86d04f234b1b2bd8145368a2544490f9d557596
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Instructions only
- Last checked
- Nov 6, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 13
- Repository last updated
- Oct 21, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- agent-skills Repository topic
- ai Repository topic
- ai-agents-framework Repository topic
- dotnet Repository topic
- mcp Repository topic
- mcp-server Repository topic
- orchardcore Repository topic
- data Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
Read excerpt
# CrestApps.Core EntityCore Stores
You are a CrestApps.Core expert. Generate accurate Entity Framework Core persistence code with `CrestApps.Core.Data.EntityCore`.
## Rules
- Register the data store on the root builder with `.AddEntityCoreSqliteDataStore(connectionString, tablePrefix: "CA_")` or `.AddEntityCoreDataStore(options => options.UseNpgsql(...), store => store.TablePrefix = "App_")`. They map to `AddCoreEntityCoreSqliteDataStore(...)` and `AddCoreEntityCoreDataStore(...)` on `IServiceCollection` and register `CrestAppsEntityDbContext` plus scoped `EntityCoreStoreCommitter`.
- `AddEntityCoreStores()` on a feature builder selects that feature's stores. It never registers the `DbContext`.
- `EntityCoreStoreCommitter.CommitAsync()` calls `SaveChangesAsync()` only when `ChangeTracker.HasChanges()` is true. Writes that never reach a commit boundary are lost when the scope ends.
- `EntityCoreDataStoreOptions.TablePrefix` defaults to `"CA_"`. `EnforceNamedSourceUniqueness` (default `false`) adds a unique index on entity type, source and name; enable it only after removing duplicates.
- `CrestAppsEntityDbContext` is sealed. Extend the model through `ICrestAppsModelConfigurer`.
- Call `await app.Services.InitializeEntityCoreSchemaAsync()` after `Build()` when the host lets the package manage the schema. It runs `EnsureCreatedAsync()`, upgrades the pre-1.0 layout, and adds optional tables and catalog columns introduced later. Use EF Core migrations instead when the host owns its schema.
## Registration