public IActionResult RemoveDatabase() { _clientContext.RemoveRange(_clientContext.Clients); _scopeContext.RemoveRange(_scopeContext.Scopes); _operationalContext.RemoveRange(_operationalContext.Tokens); _operationalContext.RemoveRange(_operationalContext.Consents); _clientContext.SaveChanges(); _scopeContext.SaveChanges(); _operationalContext.SaveChanges(); return(Json("Success")); }
public ActionResult DeleteScopes() { Message message = new Message(); message.Success = true; try { _scopeContext.RemoveRange(_scopeContext.Scopes); _scopeContext.SaveChanges(); } catch (Exception e) { message.Success = false; message.Content = "Delete fail:" + e.Message; } return(Json(message)); }