public async Task DeleteScopeAsync(string name) { if (string.IsNullOrEmpty(name)) { throw new ArgumentNullException("name"); } var adminStore = new IdentityServer3AdminStore(); await adminStore.DeleteScopeAsync(new Scope() { Name = name }); }
public async Task <ActionResult> Delete(ScopeViewModel model) { try { Scope scope = new Scope { Name = model.Name }; var adminStore = new IdentityServer3AdminStore(); await adminStore.DeleteScopeAsync(scope); return(RedirectToAction("Index")); } catch { return(View()); } }