14 lines
416 B
C#
14 lines
416 B
C#
using Femto.Modules.Blog.Domain.Posts;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace Femto.Modules.Blog.Application.Configurations;
|
|
|
|
internal class PostConfiguration : IEntityTypeConfiguration<Post>
|
|
{
|
|
public void Configure(EntityTypeBuilder<Post> table)
|
|
{
|
|
table.ToTable("post");
|
|
table.OwnsMany(post => post.Media).WithOwner();
|
|
}
|
|
}
|