Skip to content

EF Core/Dapper converters and clean architectureย #111

@modabas

Description

@modabas

First of all, thanks for this awesome library, great work. Reduces boiler plate code required for strongly typed ids to near zero.

Unfortunately, i have come across a problem integrating it to an existing project designed with clean architecture. Using eShopOnWeb project as reference, general solution structure when using EF Core (or any ORM) would be:
Application Core project => db entities as poco, without any EF Core specific decoration
Infrastructure project => db context and db entity type configurations with fluent api.

However, as strongly typed id partial structs are defined along with db entities in Application Core project, StronglyTypedId attribute generates converters in that project which makes Application Core project dependent on Entity Framework Core (or Dapper if dapper converter is generated)

Is there a way to generate converters seperately, similar to fluent api decouples entity declaration and configuration.

Regards,

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