aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Sqlite/SQLiteUserRepository.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-15 15:09:27 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-15 15:09:27 -0400
commitb838c5301787c181863436d4fc29ae1d61e25522 (patch)
treedc703198754e188d8b8cf14d283d8159074eec12 /MediaBrowser.Server.Implementations/Sqlite/SQLiteUserRepository.cs
parent2b8b98b59090ab6d077ac76cf9185da7d6ac126a (diff)
reduce uses of Task.Run
Diffstat (limited to 'MediaBrowser.Server.Implementations/Sqlite/SQLiteUserRepository.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Sqlite/SQLiteUserRepository.cs15
1 files changed, 6 insertions, 9 deletions
diff --git a/MediaBrowser.Server.Implementations/Sqlite/SQLiteUserRepository.cs b/MediaBrowser.Server.Implementations/Sqlite/SQLiteUserRepository.cs
index f55b13d19..75bb42774 100644
--- a/MediaBrowser.Server.Implementations/Sqlite/SQLiteUserRepository.cs
+++ b/MediaBrowser.Server.Implementations/Sqlite/SQLiteUserRepository.cs
@@ -195,17 +195,14 @@ namespace MediaBrowser.Server.Implementations.Sqlite
throw new ArgumentNullException("cancellationToken");
}
- return Task.Run(() =>
- {
- cancellationToken.ThrowIfCancellationRequested();
+ cancellationToken.ThrowIfCancellationRequested();
- var cmd = connection.CreateCommand();
- cmd.CommandText = "delete from users where guid=@guid";
- var guidParam = cmd.Parameters.Add("@guid", DbType.Guid);
- guidParam.Value = user.Id;
+ var cmd = connection.CreateCommand();
+ cmd.CommandText = "delete from users where guid=@guid";
+ var guidParam = cmd.Parameters.Add("@guid", DbType.Guid);
+ guidParam.Value = user.Id;
- return ExecuteCommand(cmd);
- });
+ return ExecuteCommand(cmd);
}
}
}