瀏覽代碼

Use ExecuteSqlInterpolated instead of ExecuteSqlRaw
oop

Patrick Barron 4 年之前
父節點
當前提交
54fdc2fd88
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Jellyfin.Server.Implementations/Devices/DeviceManager.cs

+ 1 - 1
Jellyfin.Server.Implementations/Devices/DeviceManager.cs

@@ -50,7 +50,7 @@ namespace Jellyfin.Server.Implementations.Devices
         {
             await using var dbContext = _dbProvider.CreateContext();
             await dbContext.Database
-                .ExecuteSqlRawAsync($"UPDATE [DeviceOptions] SET [CustomName] = ${options.CustomName}")
+                .ExecuteSqlInterpolatedAsync($"UPDATE [DeviceOptions] SET [CustomName] = {options.CustomName}")
                 .ConfigureAwait(false);
 
             DeviceOptionsUpdated?.Invoke(this, new GenericEventArgs<Tuple<string, DeviceOptions>>(new Tuple<string, DeviceOptions>(deviceId, options)));