aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Activity/ActivityManager.cs
diff options
context:
space:
mode:
authorPatrick Barron <barronpm@gmail.com>2020-08-01 16:20:08 -0400
committerPatrick Barron <barronpm@gmail.com>2020-08-01 16:20:08 -0400
commit6f306f0a17571eba7466a5f8bd591498d252e1be (patch)
tree8ac85ffec889b0973457d78437ede3a998b683f4 /Jellyfin.Server.Implementations/Activity/ActivityManager.cs
parent9ec787e95488e28708b9698ce2700e90b0f05912 (diff)
Minor fixes to ActivityManager
Diffstat (limited to 'Jellyfin.Server.Implementations/Activity/ActivityManager.cs')
-rw-r--r--Jellyfin.Server.Implementations/Activity/ActivityManager.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Jellyfin.Server.Implementations/Activity/ActivityManager.cs b/Jellyfin.Server.Implementations/Activity/ActivityManager.cs
index 65ceee32b..2deefbe81 100644
--- a/Jellyfin.Server.Implementations/Activity/ActivityManager.cs
+++ b/Jellyfin.Server.Implementations/Activity/ActivityManager.cs
@@ -40,8 +40,9 @@ namespace Jellyfin.Server.Implementations.Activity
/// <inheritdoc/>
public async Task CreateAsync(ActivityLog entry)
{
- using var dbContext = _provider.CreateContext();
- await dbContext.ActivityLogs.AddAsync(entry);
+ await using var dbContext = _provider.CreateContext();
+
+ dbContext.ActivityLogs.Add(entry);
await dbContext.SaveChangesAsync().ConfigureAwait(false);
EntryCreated?.Invoke(this, new GenericEventArgs<ActivityLogEntry>(ConvertToOldModel(entry)));