# Crestapps Core Data Storage

> Skill for choosing Entity Framework Core or YesSql stores and registering per-feature persistence in CrestApps.Core.

- Skill: `crestapps/crestapps-core-data-storage` (Agent Skill)
- Install (CLI): `npx skillmds@latest add crestapps/crestapps-core-data-storage`
- Raw SKILL.md: https://api.skillmd.com/api/skills/crestapps/crestapps-core-data-storage/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: CrestApps (https://skillmd.com/u/crestapps)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/crestapps/crestapps-core-data-storage

---


# CrestApps.Core Data Storage - Prompt Templates

## Add Durable Storage

You are a CrestApps.Core expert. Generate code and guidance for storage registration in CrestApps.Core.

### Guidelines

- Pick Entity Framework Core or YesSql based on the host architecture.
- Register the data store first, then add per-feature stores.
- Keep storage registration close to the feature that needs it so required stores stay explicit.
- Do not assume one global storage registration covers every feature automatically.
- YesSql requires an explicit backing store: call `AddYesSqlDataStore(configuration => configuration.UseSqLite(...))` (or another YesSql provider) to create the `IStore`, just as Entity Framework Core requires `AddEntityCoreSqliteDataStore(...)`. The per-feature `AddYesSqlStores()` calls do not create the store by themselves.

### Entity Framework Core Example

```csharp
builder.Services.AddCrestAppsCore(crestApps => crestApps
    .AddAISuite(ai => ai
        .AddEntityCoreStores()
        .AddOpenAI()
        .AddChatInteractions(ci => ci.AddEntityCoreStores())
        .AddDocumentProcessing(dp => dp
            .AddEntityCoreStores()
            .AddOpenXml()
            .AddPdf()
        )
        .AddAIMemory(memory => memory.AddEntityCoreStores())
    )
    .AddIndexingServices(indexing => indexing.AddEntityCoreStores())
    .AddEntityCoreSqliteDataStore("Data Source=App_Data\\crestapps.db")
);
```

### YesSql Example

```csharp
builder.Services.AddCrestAppsCore(crestApps => crestApps
    .AddAISuite(ai => ai
        .AddYesSqlStores()
        .AddOpenAI()
        .AddChatInteractions(ci => ci.AddYesSqlStores())
        .AddDocumentProcessing(dp => dp
            .AddYesSqlStores()
            .AddOpenXml()
            .AddPdf()
        )
        .AddAIMemory(memory => memory.AddYesSqlStores())
    )
    .AddYesSqlDataStore(configuration => configuration
        .UseSqLite("Data Source=App_Data\\crestapps.db;Cache=Shared")
    )
);
```

