public async Task <ActionResult> Delete(ClientViewModel model) { var adminStore = new IdentityServer3AdminStore(); await adminStore.DeleteClientIdsByUserIdAsync(User.Identity.GetUserId(), new List <string>() { model.ClientId }); await adminStore.DeleteClientAsync(model.ClientId); return(RedirectToAction("Index")); }
public async Task Test_Create_Delete_ByIdAsync() { var adminStore = new IdentityServer3AdminStore(); var insert = await CassandraTestHelper.InsertTestData_Clients(1); var result = await adminStore.FindClientByIdAsync(insert[0].ClientId); Assert.AreEqual(insert[0].ClientName, result.ClientName); await adminStore.DeleteClientAsync(insert[0].ClientId); result = await adminStore.FindClientByIdAsync(insert[0].ClientId); Assert.IsNull(result); }