Details
Description
Populate QueryField.IsKeyField automatically when System.ComponentModel.DataAnnotations.KeyAttribute is present. See QueryEntity.ScanAttributes.
This:
class Person { [QuerySqlField] [Key] public string EntityId {get; set;} } ... new QueryEntity(typeof(string), typeof(Person))
Should be equivalent to this:
<queryEntity keyType="System.String" ...> <fields> <queryField fieldType="System.String" name="EntityId" isKeyField="true" /> </fields> </queryEntity>