public static Task <HttpResponseMessage> QueryAsync(this Resources.Queries.IntegrationQuery query,
                                                     HttpRequestMessage request, UrlHelper urlHelper)
 {
     return(request.GetActorIdClaimsAsync(
                (actingAs, claims) => query.ParseAsync(request,
                                                       q => QueryByIdAsync(q.Id.ParamSingle(), actingAs, claims, request, urlHelper),
                                                       q => QueryByActorAsync(q.ActorId.ParamSingle(), actingAs, claims, request, urlHelper))));
 }
 public static async Task <HttpResponseMessage> DeleteAsync(this Resources.Queries.IntegrationQuery credential,
                                                            HttpRequestMessage request, UrlHelper urlHelper)
 {
     return(await request.GetActorIdClaimsAsync(
                (actingAs, claims) =>
                credential.ParseAsync(request,
                                      q => DeleteByIdAsync(q.Id.ParamSingle(), actingAs, claims, request, urlHelper))));
 }