mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-06-30 02:31:08 +00:00
22 lines
659 B
C#
22 lines
659 B
C#
using CleanArchitecture.Domain.DomainEvents;
|
|
using CleanArchitecture.Infrastructure.Configurations.EventSourcing;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace CleanArchitecture.Infrastructure.Database;
|
|
|
|
public class EventStoreDbContext : DbContext
|
|
{
|
|
public EventStoreDbContext(DbContextOptions<EventStoreDbContext> options) : base(options)
|
|
{
|
|
}
|
|
|
|
public virtual DbSet<StoredDomainEvent> StoredDomainEvents { get; set; } = null!;
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder.ApplyConfiguration(new StoredDomainEventConfiguration());
|
|
|
|
base.OnModelCreating(modelBuilder);
|
|
}
|
|
}
|