private static Type GetRowIdTypeFromAttribute(PropertyRoute route) { var settings = Schema.Current.Settings; var att = settings.FieldAttribute <PrimaryKeyAttribute>(route) ?? (route.IsVirtualMList() ? settings.TypeAttribute <PrimaryKeyAttribute>(route.Type.ElementType()) : null) ?? settings.DefaultPrimaryKeyAttribute; return(att.Type); }