private ActionResult Delete(OpenIdConnectClientIndexInputModel[] list)
 {
     if (ModelState.IsValid)
     {
         try
         {
             foreach (var client in list.Where(x => x.Delete))
             {
                 this.repository.Delete(client.ClientId);
             }
             TempData["Message"] = Resources.OpenIdConnectClientController.ClientsDeleted;
             return RedirectToAction("Index");
         }
         catch (ValidationException ex)
         {
             ModelState.AddModelError("", ex.Message);
         }
         catch (Exception)
         {
             ModelState.AddModelError("", Resources.OpenIdConnectClientController.ErrorDeletingClients);
         }
     }
     
     return Index();
 }
        public ActionResult Index(string action, OpenIdConnectClientIndexInputModel[] list)
        {
            if (action == "new") return RedirectToAction("Edit");
            if (action == "delete") return Delete(list);

            ModelState.AddModelError("", Resources.OpenIdConnectClientController.InvalidAction);
            return Index();
        }