Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find a better way for specifying return fields #77

Open
johanv opened this issue Aug 3, 2015 · 0 comments
Open

Find a better way for specifying return fields #77

johanv opened this issue Aug 3, 2015 · 0 comments

Comments

@johanv
Copy link
Contributor

johanv commented Aug 3, 2015

You can request specific the CiviCRM api to return specific fields, e.g. like this:

        var apiResult = ServiceHelper.CallService<ICiviCrmApi, ApiResultValues<Event>>(
            svc =>
                svc.EventGet(_apiKey, _siteKey,
                    new EventRequest {GapUitstapId = bivak.UitstapID, ReturnFields = "id,title,start_date"}));

But this is error prone, especially when using custom fields. Ideally we should be able to use lambda expressions, e.g.

ReturnFields = (l => new { l.Id, l.Title, l.StartDate })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant