Use ExecuteSqlInterpolated instead of ExecuteSqlRaw

oop
This commit is contained in:
Patrick Barron 2021-06-18 19:15:08 -04:00
parent be88efce3c
commit 54fdc2fd88

View File

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