Skip to content

Resolving and using JsonPropertyNameAttribute when using LINQ in filters #34

Description

@PeterH-CPH

Taken from the Entity Model Example:

public class Product
{
    [JsonPropertyName("ID")]
    public int Id { get; set; }
....
}

When using linq when filtering eg:

var query = client.For<Product>("Products")
    .Filter(p => p.Id == 7)
    .OrderBy("Name")
    .Top(10);

The MemberPath resolves the member name to "Id"

It would be great to have it using the JsonPropertyNameAttribute instead, so the MemberPath resolves the member name "ID"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions