Skip to content

OR-Mapper dependency in your domain logic #3

@medoni

Description

@medoni

First of all, I would like to thank you for the very good articles on your site enterprisecraftmanship. These articles helped me very much understanding and implementing DDD. Thanks for that ❤️

I have „problems“ with your GetRealType() - Method on every Entity. This adds a very hard dependency to your Domain Logic for every Entity. I think in DDD the domain logic must not know anything about the underlaying database.

But I also know why this is needed when using OR-Mapper. Currently I‘m facing same issues with EF Core (7) using transparent proxies.

In my opinion the OR-Mapper should provide a why of proxying single properties without the need of inheritance.

For example the OR-Mapper could create transparent proxies for IList, ISet or implement an ILazy for referencing other entities with foreign keys.

What do you think?

return NHibernateProxyHelper.GetClassWithoutInitializingProxy(this);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions