Closed FH-Inway closed 1 year ago
@AndreasHassing Hope it's ok to continue this discussion here.
So the NavigationProperty
tags under the EntityType
are kept by EDMXTrimmer if the entity that is referenced by the navigation link is also part of the trimmed file. Would that work for you? Or do you need relations that point to entities that are not part of the trimmed edmx?
A change for that would be simple, we would just introduce a new argument that would prevent the following part of the trimming logic from executing. However, I'm not sure if the resulting file would still be valid. E.g. could ODataConnectedService still generate a compileable C# client from it? And if so, how would that client behave if a link to an entity is called where the entity does not exist in the client?
@AndreasHassing Hope it's ok to continue this discussion here.
So the
NavigationProperty
tags under theEntityType
are kept by EDMXTrimmer if the entity that is referenced by the navigation link is also part of the trimmed file. Would that work for you? Or do you need relations that point to entities that are not part of the trimmed edmx?A change for that would be simple, we would just introduce a new argument that would prevent the following part of the trimming logic from executing. However, I'm not sure if the resulting file would still be valid. E.g. could ODataConnectedService still generate a compileable C# client from it? And if so, how would that client behave if a link to an entity is called where the entity does not exist in the client?
Oh really? From peeking at the readme and code, it looked like you always remove navigation links, regardless of whether the linked-to entity is in the list of entities to keep.
That is not how it works, it sounds like?
Yeah I see now. You have a Where
which only finds links to entities that haven't been chosen. My bad!
@AndreasHassing Not at all and thanks for the feedback. I will close this issue, but feel free to post further questions or comments (or open a new issue).
@AndreasHassing mentioned in https://github.com/OData/ODataConnectedService/issues/327#issuecomment-1591368666 that relations are not kept in the trimmed file.
To avoid an off topic discussion in that issue, this issue was created to continue the discussion here.
The discussion so far:
@FH-Inway https://github.com/OData/ODataConnectedService/issues/327#issuecomment-1591015472
@AndreasHassing https://github.com/OData/ODataConnectedService/issues/327#issuecomment-1591368666
@FH-Inway https://github.com/OData/ODataConnectedService/issues/327#issuecomment-1591559538
@AndreasHassing https://github.com/OData/ODataConnectedService/issues/327#issuecomment-1591633918