public void SetProperty(Func <AppQuery, AppQuery> query, string propertyName, object value) { AppResult[] results = Query(query); foreach (var result in results) { session.SetProperty(result, propertyName, value); } }