Skip to content

Commit 1368572

Browse files
committed
Update EntityFrameworkCoreXmlRepository.cs
1 parent 76c0bf0 commit 1368572

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/DataProtection/EntityFrameworkCore/src/EntityFrameworkCoreXmlRepository.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public virtual IReadOnlyCollection<XElement> GetAllElements()
4242
{
4343
using (var scope = _services.CreateScope())
4444
{
45+
var context = scope.ServiceProvider.GetRequiredService<TContext>();
4546
// Put logger in a local such that `this` isn't captured.
4647
var logger = _logger;
4748
return context.DataProtectionKeys.AsNoTracking().Select(key => TryParseKeyXml(key.Xml, logger)).ToList().AsReadOnly();

0 commit comments

Comments
 (0)