public async Task DeleteAsync(int id)
        {
            var entity = IdentityResources.Find(id);

            if (Context.Entry(entity).State == EntityState.Detached)
            {
                IdentityResources.Attach(entity);
            }
            IdentityResources.Remove(entity);
            await Context.SaveChangesAsync();
        }
Beispiel #2
0
        public async Task DeleteClientAsync(int clientId)
        {
            var entity = Clients.Find(clientId);

            if (Context.Entry(entity).State == EntityState.Detached)
            {
                Clients.Attach(entity);
            }
            Clients.Remove(entity);
            await Context.SaveChangesAsync();
        }