Skip to content

Entity Framework Core

Add relational persistence when your Arc application needs it. The optional Cratis.Arc.EntityFrameworkCore package provides context registration, model conversion, and observation without requiring Chronicle or event sourcing. Begin with getting started; registration selects a provider but does not create your schema.

TopicDescription
Getting StartedHow to configure Entity Framework Core with Arc, including auto-discovery and observation support.
Base DbContextHow to use the base DbContext class provided by the Arc.
Entity MappingHow to configure entities using IEntityTypeConfiguration<T> for clean, organized entity configuration.
Read Only DbContextsHow to implement read-only database contexts for query scenarios.
Automatic Database hookupProvider detection, pooled context registration, and connection-string limits.
Observing DbSetHow to monitor entity changes in real-time using reactive extensions.
Common Column TypesCommon column type configurations and conventions.
Property ExtensionsProperty configuration extensions for cross-database compatibility.
JsonWorking with JSON columns and serialization in Entity Framework Core.
Geometry storage pathsExplicit string conversion versus JSON properties and spatial migration declarations.
Guid conversionSQLite string conversion and migration type differences.
Concept conversionStore strongly typed values.

The Entity Framework Core integration in the Arc streamlines database operations by providing sensible defaults, automatic configuration, and patterns that work well with CQRS architecture. Whether you’re working with read-write or read-only contexts, the framework handles the complexity of setup and configuration while giving you the flexibility to customize when needed.