Explorar o código

Use ExecuteSqlInterpolated instead of ExecuteSqlRaw
oop

Patrick Barron %!s(int64=4) %!d(string=hai) anos
pai
achega
54fdc2fd88
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)));