Skip to content
This repository was archived by the owner on Jul 12, 2020. It is now read-only.
This repository was archived by the owner on Jul 12, 2020. It is now read-only.

CosmosCollectionAttribute breaks POCO benefits #83

@RobEyres

Description

@RobEyres

We're trying to refactor our Cosmos entity models to allow them to be reused over numerous projects / applications. One of the big problems introduced was that the entities are now marked up with [CosmosCollection] but we don't want to drag in a dependency to Cosmonaut everywhere the entities are referenced (the consuming libraries have nothing to do with Cosmos or storage concerns).

Would it be possible to abstract the concepts of "entity to collection mapping" and also partition key mapping away by providing an interface. E.g. By having a ICosmosEntityToCollectionMapper type class, the consumer can get away without having to mark up entities with Cosmonaut attributes.

Perhaps the default ICosmosEntityToCollectionMapper could rely on Cosmonaut attributes and fall back on convention as is the current behaviour.

Anyway...please let me know what you think. I could always spike this concept in a branch if this would help?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions