Data Stores
FlexBase provides a comprehensive set of data store abstractions for modern application development. Each store type is designed for specific use cases and provides a unified interface across multiple provider implementations.
Available Data Stores
Core Data Stores
Document Store
JSON document storage
MongoDB, CosmosDB, DynamoDB, RavenDB
File Store
Binary file storage
AWS S3, Azure Blob, GCP Storage, Disk
Graph Store
Relationship networks
Neo4j, Cosmos Gremlin
Time Series Store
Time-based metrics
InfluxDB, TimescaleDB, Azure Data Explorer
When to Use Each Store
Semantic search
Vector Store
Keyword search
Full-Text Search
Document management
Document Store
File uploads
File Store
Social networks
Graph Store
IoT/Metrics
Time Series Store
Structured data
Quick Start
Automatic Setup via Flex Studio
Data Store providers are automatically added to your application through Flex Studio. When you add a data store provider:
Provider files are created in
Infrastructure/Providers/{YourApplication}.DataStoreProviders/{Category}/{Provider}/NuGet package is referenced automatically
Default configuration is added to
Application/EndPoints/{YourApplication}.EndPoint.CommonConfigs/AppSettings/DataStores/{Category}/{Provider}.jsonREADME documentation is included in the provider folder
You can find all provider files, configuration examples, and documentation in the generated infrastructure folder.
1. Choose Your Store
Select the appropriate store type based on your use case. Each store has specific strengths:
Vector Store - When you need AI-powered semantic search or RAG
Full-Text Search - When you need fast keyword search with ranking
Document Store - When you need flexible schema and JSON storage
File Store - When you need to store and serve binary files
2. Add Provider via Flex Studio
In Flex Studio, select the data store category and provider you want to use. Flex Studio will:
Create the provider infrastructure folder
Reference the appropriate NuGet package
Generate default configuration files
Include provider-specific documentation
3. Configure and Use
After adding via Flex Studio:
Update configuration in the generated
AppSettings/DataStores/{Category}/{Provider}.jsonfileReview registration examples in the provider folder's README
Register in DI using the extension methods shown in the README
Inject and use in your services
Featured: Vector Store + AI
The Vector Store is particularly powerful when combined with AI Providers for implementing RAG (Retrieval-Augmented Generation):
Hybrid Approaches
Vector + Full-Text Search
Combine semantic and keyword search for best results:
SQL Server 2025: All-in-One
SQL Server 2025 supports both relational data AND vector search in one database:
Provider-Agnostic Design
All FlexBase data stores follow a consistent pattern:
Unified Interface - Same API across all providers
Provider-Specific Features - Access advanced features when needed
Easy Migration - Switch providers with configuration changes
Testing Support - Mock implementations for unit tests
Integration with FlexBase Features
All data stores integrate seamlessly with FlexBase features:
Dependency Injection - Standard IOptions pattern
Logging - Structured logging built-in
Health Checks - Test connectivity on startup
Configuration - appsettings.json support
Multi-tenancy - Tenant isolation support
Caching - Integration with FlexCache
Best Practices
Start Simple - Use what you need, add complexity later
Test Locally - Use in-memory or local providers for development
Monitor Performance - Track query times and costs
Implement Caching - Cache frequently accessed data
Plan for Scale - Consider growth from the start
Use Hybrid - Combine stores for optimal results
Advanced Usage Examples
Vector Store
Vector stores are used for semantic search and retrieval-augmented generation (RAG). Below is an example:
Full-Text Search
Full-text search stores are optimized for keyword-based search. Below is an example:
Document Store
Document stores are ideal for JSON-based storage. Below is an example:
File Store
File stores are used for binary file storage. Below is an example:
See Also
Relational Databases - EF Core and Dapper
AI Providers - Generate embeddings for vector search
Email Providers - Send transactional emails
Message Providers - SMS and push notifications
Last updated