/// <inheritdoc /> public void StoreElement(XElement element, string friendlyName) { var newKey = new DataProtectionEntity { FriendlyName = friendlyName, Xml = element.ToString(SaveOptions.DisableFormatting) }; _context.Document.CreateAsync(_database, _collection, newKey).Wait(); }
/// <inheritdoc /> public void StoreElement(XElement element, string friendlyName) { using var scope = _services.CreateScope(); var context = scope.ServiceProvider.GetRequiredService <ArangoContext>(); var newKey = new DataProtectionEntity { FriendlyName = friendlyName, Xml = element.ToString(SaveOptions.DisableFormatting) }; context.CreateDocumentAsync(_database, _collection, newKey).Wait(); }