Marten.FSharp
Marten.FSharp copied to clipboard
is it possible to filter based on the value of a discriminated union?
Hello,
Does the library supports filtering / querying documents based on the case of a discriminated union? (for example to select only documents having a property whose DU has a specific case)
I resorted to changing the representation of discriminated unions (by defining one property per case in my DTOs) but was wondering if by any chance this library managed to streamline this use case.
There's nothing built in. Marten does have docs on extending the linq syntax that you could try out. I would happily take any PRs that make sense!