Skip to content

Commit caa087c

Browse files
TommyRushNickCraver
authored andcommitted
Specify to use Opserver's ToHashSet for spaceIds to prevent an ambiguous method error with Enumerable.ToHashSet. (#343)
Viewing the storage modal on a database has an ambiguous error with ToHashSet.
1 parent 2aa97ed commit caa087c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Opserver/Views/SQL/Databases.Modal.Storage.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
var files = filesRaw?.Data?.Where(f => f.DatabaseId == db?.Id).OrderBy(f => f.FileType).ThenBy(f => f.PhysicalName);
1010
var tablesRaw = i?.GetTableInfo(Model.Database);
1111
var tables = tablesRaw.Data?.OrderByDescending(t => t.TotalSpaceKB).ThenBy(t => t.TableName).ToList();
12-
var spaceIds = files?.Select(f => f.DataSpaceId).Where(id => id > 0).ToHashSet() ?? new HashSet<int>();
12+
var spaceIds = StackExchange.Opserver.ExtensionMethods.ToHashSet(files?.Select(f => f.DataSpaceId).Where(id => id > 0)) ?? new HashSet<int>();
1313
var spacesRaw = i?.GetDataSpaceInfo(Model.Database);
1414
var spaces = spacesRaw.Data?.Where(ds => spaceIds.Contains(ds.Id)) ?? new List<SQLInstance.DatabaseDataSpace>();
1515
const int topTableShowCount = 10;

0 commit comments

Comments
 (0)