I love the “Raw SQL Filters” AutoQuery feature and the way has been implemented makes perfectly sense.
I wonder if the “select” option could be used also on Response DTO property(known by the consumer through the metadata page) name instead of only on db field.
Allowing that option, the db model could be transparent(DTO field may not match with db column/orm poco ) to the consumer and the same DTO could be reused for different projections removing or adding fields as he needs.
I’m not following, can you provide a concrete example.
I’m using the following class as Orm Poco and AutoQueryResponse
[Alias("myDbTable")]
[DataContract]
public class MyResponseDTO
{
[Alias("myDbTableID")]
[DataMember(Name="id")]
public int Id { get; set; }
[Alias("myDbTableDisplayName")]
[DataMember(Name = "displayName")]
public string DisplayName { get; set; }
[Alias("myDbTableName")]
[DataMember(Name = "name")]
public string Name { get; set; }
}
I’d like to let the consumer specifying the property to be filled following the DTO naming:
?_select=Id,Name
but that does not work
I have to use instead
?_select=myDbTableID,myDbTableName
No, the free-text _select
is passed through as-is, it’s not touched/parsed/validated.