-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Labels
ClientImprovements or additions to the client codeImprovements or additions to the client code
Milestone
Description
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
Labels
ClientImprovements or additions to the client codeImprovements or additions to the client code