public async Task ShouldRemoveGrant() { _database.PersistedGrants.Add(new PersistedGrant() { ClientId = "clientId", CreationTime = DateTime.Now, Key = "teste" }); await _database.SaveChangesAsync(); InMemoryData.DetachAll(); var command = new RemovePersistedGrantViewModel("teste"); await _persistedGrant.Remove(command); _database.PersistedGrants.Count().Should().Be(0); }
public async Task <bool> Commit() { var linesModified = await _adminUiContext.SaveChangesAsync(); return(linesModified > 0); }