public virtual async Task IncrementFailedDecryptions() { var failedDecryptions = Secret.SecretProperties.FirstOrDefault(q => q.Type == SecretProperties.FailedDecryptions); if (failedDecryptions == null) { failedDecryptions = new SecretProperty(SecretProperties.FailedDecryptions) { SecretId = Secret.Id }; failedDecryptions.SerializeData(1); Secret.SecretProperties.Add(failedDecryptions); } failedDecryptions.SerializeData(failedDecryptions.DeserializeData <int>() + 1); await _secretStore.UpdateAsync(Secret); }