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

Add support for filtering by enum property types #35

Closed
kzu opened this issue Jun 16, 2021 · 0 comments · Fixed by #36
Closed

Add support for filtering by enum property types #35

kzu opened this issue Jun 16, 2021 · 0 comments · Fixed by #36
Labels
enhancement New feature or request

Comments

@kzu
Copy link
Member

kzu commented Jun 16, 2021

Given the following entity:

public enum BookFormat { Paperback, Hardback }

public record Book(string ISBN, string Title, string Author, BookFormat Format);

The following query should Just Work™:

await foreach (var info in from book in repo.CreateQuery()
                            where book.Format == BookFormat.Hardback
                            select new { book.ISBN, book.Title })
{
}

Note that this does not work in the built-in TableQuery<T> in CosmosDB :).

Back this issue
Back this issue

@kzu kzu added the enhancement New feature or request label Jun 16, 2021
kzu added a commit that referenced this issue Jun 16, 2021
"Fix" this support in CosmosDB table client, which does not support this type of query :).

Fixes #35
kzu added a commit that referenced this issue Jun 16, 2021
"Fix" this support in CosmosDB table client, which does not support this type of query :).

Fixes #35
kzu added a commit that referenced this issue Jun 16, 2021
"Fix" this support in CosmosDB table client, which does not support this type of query :).

Fixes #35
kzu added a commit that referenced this issue Jun 16, 2021
"Fix" this support in CosmosDB table client, which does not support this type of query :).

Fixes #35
@kzu kzu closed this as completed in #36 Jun 16, 2021
kzu added a commit that referenced this issue Jun 16, 2021
"Fix" this support in CosmosDB table client, which does not support this type of query :).

Fixes #35
@devlooped devlooped locked and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant