Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a usable version of getEventByCorrelationId #19

Merged
merged 1 commit into from
Mar 27, 2019
Merged

Make a usable version of getEventByCorrelationId #19

merged 1 commit into from
Mar 27, 2019

Conversation

TheAngryByrd
Copy link
Contributor

This adds @baronfel's Newtonsoft.Json.FSharp.Idiomatic to provide custom JsonConverters that are more friendly for F# serializing.

without these custom converters, Marten will save in the database:

"CorrelationId": {"Case": "Some", "Fields": ["01d6c038-202e-4b60-8568-adbd881d38a8"]}

with custom converters, it becomes more normal

"CorrelationId": "01d6c038-202e-4b60-8568-adbd881d38a8"

Now that the json that gets serialized turns out to be more predictable, we can use raw sql to query the EventRead table easily.

Although this doesn't use Martens Linq generation, it's the quickest option to getting a production ready version.

This adds @baronfel's Newtonsoft.Json.FSharp.Idiomatic to provide custom JsonConverter that are more friendly for F# serializing.  Now that the json that gets serialized turns out to be sane, we can use raw sql to query the EventRead table easily.  Although this doesn't use Martens Linq generation, it's the quickest option to getting a production ready version
@Dzoukr Dzoukr merged commit 7fd8e45 into Dzoukr:master Mar 27, 2019
@Dzoukr
Copy link
Owner

Dzoukr commented Mar 27, 2019

Thanks @TheAngryByrd !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants