Skip to content

[Feature request] Using enum comparisons in queries #61

@hansmbakker

Description

@hansmbakker

Is your feature request related to a problem? Please describe.
The archived azure-mobile-apps sdk did not support enums in queries (especially client-side).

Describe the solution you'd like
Support for queries that use enums in Where filters

var query = dataSyncClient.GetTable<InspectionSyncModel>()
    .Where(x => x.Status == InspectionStatusSyncModel.Unassigned);

var count = await query.LongCountAsync();

In the old SDK, that syntax was supported but it returned zero results for us.

Describe alternatives you've considered
Doing a string-based comparison in the Where query - this was the workaround for the old sdk.

var query = dataSyncClient.GetTable<InspectionSyncModel>()
    .Where(x => x.Status.ToString().Equals(InspectionStatusSyncModel.Unassigned.ToString(), StringComparison.OrdinalIgnoreCase));

var count = await query.LongCountAsync();

Additional context
Maybe using EF Core client-side will support this out-of-the-box?

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientImprovements or additions to the client code

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions