Skip to content

Guides

Welcome to the DTDE guides! This section contains tutorials to help you get started and become productive with DTDE.


Learning Path

Follow this recommended path to learn DTDE:

graph LR
    A[Quick Start] --> B[Getting Started]
    B --> C{Choose Focus}
    C --> D[Sharding Guide]
    C --> E[Temporal Guide]
    D --> F[Migration Guide]
    E --> F

Guide Overview

Guide Description Time Level
Quick Start Minimal setup to get running 5 min Beginner
Getting Started Complete introduction to DTDE 20 min Beginner
Sharding Guide All sharding strategies in depth 25 min Intermediate
Temporal Guide Point-in-time queries and versioning 20 min Intermediate
Migration Guide Migrate existing EF Core projects 15 min Intermediate

Quick Start (5 minutes)

The fastest way to get DTDE running:

// 1. Inherit from DtdeDbContext
public class AppDbContext : DtdeDbContext
{
    public DbSet<Customer> Customers => Set<Customer>();

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        base.OnModelCreating(modelBuilder);

        // 2. Configure sharding
        modelBuilder.Entity<Customer>()
            .ShardBy(c => c.Region);
    }
}

// 3. Register with UseDtde()
services.AddDbContext<AppDbContext>(options =>
    options.UseSqlServer(connectionString)
           .UseDtde(dtde => dtde
               .AddShard(s => s.WithId("EU").WithShardKeyValue("EU"))
               .AddShard(s => s.WithId("US").WithShardKeyValue("US"))));

Full Quick Start


Choose Your Path

New to DTDE?

  1. Quick Start - Get running in 5 minutes
  2. Getting Started - Understand all the concepts
  3. Sharding Guide or Temporal Guide - Deep dive

Experienced with EF Core?

  1. Getting Started - DTDE-specific concepts
  2. Jump directly to Sharding Guide or Temporal Guide

Migrating an Existing Project?

  1. Migration Guide - Step-by-step migration
  2. API Reference - Detailed API documentation


← Back to Documentation | Quick Start →