Relational Db
FlexBase provides flexible options for working with relational databases, supporting both full-featured ORM (Entity Framework Core) and high-performance micro-ORM (Dapper/Flex MicroORM) approaches.
Available Options
Full-featured ORM with change tracking, LINQ queries, and migrations
Complex domain models, navigation properties, automatic change tracking
High-performance micro-ORM with provider-agnostic abstractions
High-performance reads, bulk operations, complex SQL queries
Quick Comparison
Performance
Good
Excellent
Abstraction Level
High
Low
Change Tracking
✅ Automatic
❌ Manual
LINQ Support
✅ Full
❌ Raw SQL
Migrations
✅ Built-in
❌ Manual
Navigation Properties
✅ Lazy/Eager loading
❌ Manual mapping
Learning Curve
Moderate
Minimal
Bulk Operations
Good
Excellent
Supported Database Providers
Both EF Core and Dapper support multiple database providers:
SQL Server (default)
PostgreSQL
MySQL / MariaDB
SQLite
Oracle
When to Use Each
Use Entity Framework Core when:
You have complex domain models with relationships
You need automatic change tracking
You want to use LINQ for type-safe queries
You need automatic database migrations
You prefer higher-level abstractions
Use Dapper when:
Performance is critical
You're comfortable with SQL
You need to execute complex, optimized queries
You're doing bulk operations
You want minimal overhead
Can I Use Both?
Yes! Many applications use both:
EF Core for complex domain models and transactional operations
Dapper for high-performance read queries and reporting
FlexBase Integration
Both approaches integrate seamlessly with FlexBase features:
Provider-agnostic SQL - Use
ProviderSqlMapto write database-specific queriesAsync query extensions - Use
*AsyncFlexmethods that work across bothSoft delete filtering - Automatic filtering of soft-deleted records
Audit trail - Automatic audit logging of changes
Multi-database support - Switch providers without code changes
Getting Started
Choose your approach (or use both)
Follow the specific guide:
Configure your database provider
Start building!
See Also
Full-Text Search - Search capabilities across databases
Provider SQL Map - Multi-database SQL support
Audit Trail - Automatic audit logging
Last updated