init
This commit is contained in:
commit
ab2e20f7e1
72 changed files with 2000 additions and 0 deletions
18
Femto.Modules.Blog/Data/BlogContext.cs
Normal file
18
Femto.Modules.Blog/Data/BlogContext.cs
Normal file
|
@ -0,0 +1,18 @@
|
|||
using Femto.Modules.Blog.Domain.Posts;
|
||||
using Femto.Modules.Blog.Infrastructure.Integration;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Femto.Modules.Blog.Data;
|
||||
|
||||
internal class BlogContext(DbContextOptions<BlogContext> options) : DbContext(options)
|
||||
{
|
||||
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