public static Task <HttpResponseMessage> QueryAsync(this Resources.Queries.PasswordCredentialQuery credential,
                                                     HttpRequestMessage request, UrlHelper urlHelper)
 {
     return(request.GetActorIdClaimsAsync(ClaimsDefinitions.AccountIdClaimType,
                                          (actorPerformingId, claims) => credential.ParseAsync(request,
                                                                                               q => QueryByIdAsync(q.Id.ParamSingle(), request, urlHelper, actorPerformingId, claims),
                                                                                               q => QueryByActorId(q.Actor.ParamSingle(), request, urlHelper, actorPerformingId, claims))));
 }
 public static async Task <HttpResponseMessage> DeleteAsync(this Resources.Queries.PasswordCredentialQuery credential,
                                                            HttpRequestMessage request, UrlHelper urlHelper)
 {
     return(await credential.ParseAsync(request,
                                        q => DeleteByIdAsync(q.Id.ParamSingle(), request, urlHelper)));
 }