internal async Task<string> Upsert(ElasticClient elastic) { var op = await elastic.UpdateAsync<ElasticReminderEntry>( u => u .Doc(this) .DocAsUpsert(true) ); if (!op.IsValid ) throw new ElasticsearchStorageException("Error occured during update for ElasticReminderEntry",op.ConnectionStatus.OriginalException); return op.Version; }