Problem with Bounded Context and Shared DbContext Base in a Modular Monolith using DDD

I am relatively new to Entity Framework, and I might be misunderstanding some concepts, so I need some guidance. I am building a modular monolith using Domain-Driven Design (DDD) and trying to apply the concept of Bounded Contexts. I followed the idea presented in this article: https://learn.microsoft.com/en-us/archive/msdn-magazine/2013/january/data-points-shrink-ef-models-with-ddd-bounded-contexts, but I haven’t had success so far.

For some reason, the configuration is not being interpreted as it should. An example of this is that EF is treating my value objects as entities after trying this approach

The approach I am trying to follow is to use a central building block in my architecture, where I have a base DbContext that contains all the classes representing the tables of my application. Additionally, I am using the same database for all bounded contexts. Below is the implementation of the base DbContext:

public class BaseDbContext<TContext> : DbContext
where TContext : DbContext
{
    protected BaseDbContext(DbContextOptions<TContext> options) : base(options) 
    {
        Database.EnsureCreated();
    }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        base.OnModelCreating(modelBuilder);
        modelBuilder.ApplyConfigurationsFromAssembly(SchemaManagementAssemblyReference.Assembly);
    }
}

In the assembly of this DbContext, I also have objects that represent the full definition of my tables and their configurations. For example:

internal sealed class AddressSchema : BaseEntity
{
    public override int Id { get; protected set; }
    public override Guid Uuid { get; protected init; }
    public int? ParticipantId { get; private set; }
    public int? AdherenceId { get; private set; }
    public int? BeneficiaryId { get; private set; }
    public Street? Street { get; private set; }
    public Neighborhood? Neighborhood { get; private set; }
    public City? City { get; private set; }
    public State? State { get; private set; }
    public Country? Country { get; private set; }
    public ZipCode? ZipCode { get; private set; }
    public Number? Number { get; private set; }
    public AddressLine? AddressLine { get; private set; }
    public bool IsForeign { get; private set; }
    public override DateTime CreatedAt { get; protected set; }
    public override DateTime? UpdatedAt { get; protected set; }
    public override bool IsDeleted { get; protected set; }
    }

I also have some ValueObjects that are configured as columns in the database

public sealed class AddressLine : ValueObject
{
    private readonly string _value;
    //...

    private AddressLine(string value)
    {
      //...
    }

    public static implicit operator string? (AddressLine? addressLine) => addressLine?._value;
    public static implicit operator AddressLine(string value) => new(value);
    //...
}

And the mappings configuration:

public abstract class BaseEntityTypeConfiguration<T> : IEntityTypeConfiguration<T>
where T : BaseEntity
{
    public virtual void Configure(EntityTypeBuilder<T> builder)
    {
        builder.Property(entity => entity.Uuid)
            .ValueGeneratedOnAdd()
            .HasDefaultValueSql(SchemaConstants.DefaultValues.MssqlNewGuidValue);

        builder.HasIndex(entity => entity.Uuid)
            .IsUnique();

        builder.Property(entity => entity.CreatedAt)
            .HasDefaultValueSql(SchemaConstants.DefaultValues.MssqlCurrentUtcDateValue)
            .ValueGeneratedOnAdd();

        builder.Property(entity => entity.UpdatedAt);

        builder.Property(entity => entity.IsDeleted)
            .HasDefaultValue(false)
            .ValueGeneratedOnAdd();

        builder.HasQueryFilter(entity => !entity.IsDeleted)
            .HasIndex(entity => entity.IsDeleted)
            .HasFilter(FilterConstants.IsNotDeletedFilter);

        builder.HasIndex(entity => entity.IsDeleted);
    }
}
internal sealed class AddressSchemaMap : BaseEntityTypeConfiguration<AddressSchema>
{
    public override void Configure(EntityTypeBuilder<AddressSchema> builder)
    {
        base.Configure(builder);

        builder.Property(address => address.Street)
            .HasMaxLength(Street.MaxLength)
            .HasConversion(ValueObjectConverter<Street, string>.Create()!);

        builder.Property(address => address.City)
            .HasMaxLength(City.MaxLength)
            .HasConversion(ValueObjectConverter<City, string>.Create()!);

        builder.Property(address => address.Neighborhood)
            .HasMaxLength(Neighborhood.MaxLength)
            .HasConversion(ValueObjectConverter<Neighborhood, string>.Create()!);

        builder.Property(address => address.ZipCode)
            .HasMaxLength(ZipCode.MaxLength)
            .HasConversion(ValueObjectConverter<ZipCode, string>.Create()!);

        builder.Property(address => address.Country)
            .HasMaxLength(Country.MaxLength)
            .HasConversion(ValueObjectConverter<Country, string>.Create()!);

        builder.Property(address => address.State)
            .HasMaxLength(State.MaxLength)
            .HasConversion(ValueObjectConverter<State, string>.Create()!);

        builder.Property(address => address.AddressLine)
            .HasMaxLength(AddressLine.MaxLength)
            .HasConversion(ValueObjectConverter<AddressLine, string>.Create()!);

        builder.Property(address => address.Number)
            .HasMaxLength(Number.MaxLength)
            .HasConversion(ValueObjectConverter<Number, string>.Create()!);

        builder.Property(address => address.IsForeign)
            .IsRequired();

        builder.HasOne<ParticipantSchema>()
            .WithOne(participant => participant.Address)
            .HasForeignKey<AddressSchema>(address => address.ParticipantId)
            .OnDelete(DeleteBehavior.NoAction);

        builder.HasOne<AdherenceSchema>()
            .WithOne(adherence => adherence.Address)
            .HasForeignKey<AddressSchema>(address => address.AdherenceId)
            .OnDelete(DeleteBehavior.NoAction);

        builder.HasOne<BeneficiarySchema>()
            .WithOne(beneficiary => beneficiary.Address)
            .HasForeignKey<AddressSchema>(address => address.BeneficiaryId)
            .OnDelete(DeleteBehavior.NoAction);

        builder.ToTable("Addresses");
    }
}

In my bounded contexts, I derive from this base DbContext as follows:

internal sealed class LoanDbContext : BaseDbContext<LoanDbContext>
{
    public LoanDbContext(DbContextOptions<LoanDbContext> options) : base(options)
    {
    }

    public DbSet<Address> Addresses{ get; private set; }
    //....
}

In my bounded contexts, I use the domain entities in my DbSets, but I am not sure if this might be causing an issue.

When I attempt to create a new migration, I get the following error:

Unable to create a 'DbContext' of type ''. The exception 'No suitable constructor was found for entity type 'AddressLine'. The following constructors had parameters that could not be bound to properties of the entity type:
    Cannot bind 'value' in 'AddressLine(string value)'
Note that only mapped properties can be bound to constructor parameters. Navigations to related entities, including references to owned types, cannot be bound.'    

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật