Skip to content

Plugin with precreate not querying as expected #65

Discussion options

You must be logged in to vote

@victorsolaya thanks for your comment.

This is by design (also in v1).

When you use ExecutePlugin* methods that make updates to the target entity, these won't be persisted into the In-Memory db if the plugin code doesn't make any explicit calls to .Update(), .Create() and so on...

BUT, you can easily assert any modifications made to the target but just asserting on it directly (since the reference in memory is the same), and so there is no need to use .CreateQuery() for it.

This is already covered in the docs: https://dynamicsvalue.github.io/fake-xrm-easy-docs/quickstart/plugins/overview/

Please see "Asserting on the Target entity and/or other PluginContext properties" section in that lin…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jordimontana82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants