hopefully not a horribly foolish refactoring
This commit is contained in:
parent
59d660165f
commit
1ecaf64dea
82 changed files with 782 additions and 398 deletions
18
Femto.Modules.Blog/Application/BlogContext.cs
Normal file
18
Femto.Modules.Blog/Application/BlogContext.cs
Normal file
|
@ -0,0 +1,18 @@
|
|||
using Femto.Common.Infrastructure.Outbox;
|
||||
using Femto.Modules.Blog.Domain.Posts;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Femto.Modules.Blog.Application;
|
||||
|
||||
internal class BlogContext(DbContextOptions<BlogContext> options) : DbContext(options), IOutboxContext
|
||||
{
|
||||
public virtual DbSet<Post> Posts { get; set; }
|
||||
public virtual DbSet<OutboxEntry> Outbox { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
{
|
||||
base.OnModelCreating(builder);
|
||||
builder.HasDefaultSchema("blog");
|
||||
builder.ApplyConfigurationsFromAssembly(typeof(BlogContext).Assembly);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue