diff --git a/KVA/Migration.Toolkit.Source/Handlers/MigrateMediaLibrariesCommandHandler.cs b/KVA/Migration.Toolkit.Source/Handlers/MigrateMediaLibrariesCommandHandler.cs index 97c8a733..fedd3ae2 100644 --- a/KVA/Migration.Toolkit.Source/Handlers/MigrateMediaLibrariesCommandHandler.cs +++ b/KVA/Migration.Toolkit.Source/Handlers/MigrateMediaLibrariesCommandHandler.cs @@ -1,5 +1,3 @@ -using System.Collections.Immutable; - using CMS.Base; using CMS.MediaLibrary; @@ -57,14 +55,14 @@ HAVING COUNT(*) > 1 """, (reader, _) => new { - LibraryName = reader.Unbox("LibraryName"), + LibraryName = reader.Unbox("LibraryName"), LibraryGuid = reader.Unbox("LibraryGUID") }); var groupedMls = unsuitableMediaLibraries .GroupBy(x => x.LibraryName) .Select(x => new { LibraryGuids = x.Select(y => y.LibraryGuid).ToArray(), LibraryName = x.Key }); - + foreach (var mlg in groupedMls) { logger.LogError( diff --git a/KVA/Migration.Toolkit.Source/Services/SpoiledGuidContext.cs b/KVA/Migration.Toolkit.Source/Services/SpoiledGuidContext.cs index ff2fb425..a65750cb 100644 --- a/KVA/Migration.Toolkit.Source/Services/SpoiledGuidContext.cs +++ b/KVA/Migration.Toolkit.Source/Services/SpoiledGuidContext.cs @@ -34,7 +34,8 @@ GROUP BY DocumentGUID HAVING COUNT(DocumentID) > 1 ) """, - (reader, version) => new { + (reader, version) => new + { DocumentGUID = reader.Unbox("DocumentGUID"), NodeID = reader.Unbox("NodeID"), NodeSiteID = reader.Unbox("NodeSiteID"), @@ -59,10 +60,10 @@ HAVING COUNT(NodeGUID) > 1 """, (reader, version) => new { - NodeGUID = reader.Unbox("NodeGUID"), + NodeGUID = reader.Unbox("NodeGUID"), NodeSiteID = reader.Unbox("NodeSiteID") }) - .GroupBy(x=>x.NodeGUID) + .GroupBy(x => x.NodeGUID) .ToFrozenDictionary( x => x.Key, x => x.Select(i => new SpoiledNodeGuidInfo(i.NodeSiteID)).ToImmutableList() diff --git a/Migration.Toolkit.Core.K11/Handlers/MigrateMembersCommandHandler.cs b/Migration.Toolkit.Core.K11/Handlers/MigrateMembersCommandHandler.cs index 78694a16..4992bdcf 100644 --- a/Migration.Toolkit.Core.K11/Handlers/MigrateMembersCommandHandler.cs +++ b/Migration.Toolkit.Core.K11/Handlers/MigrateMembersCommandHandler.cs @@ -13,7 +13,6 @@ using Migration.Toolkit.Core.K11.Mappers; using Migration.Toolkit.K11; using Migration.Toolkit.K11.Models; -using Migration.Toolkit.KXP.Api.Auxiliary; using Migration.Toolkit.KXP.Api.Enums; namespace Migration.Toolkit.Core.K11.Handlers; diff --git a/Migration.Toolkit.Core.K11/Handlers/MigrateUsersCommandHandler.cs b/Migration.Toolkit.Core.K11/Handlers/MigrateUsersCommandHandler.cs index cf4f67ea..10fca896 100644 --- a/Migration.Toolkit.Core.K11/Handlers/MigrateUsersCommandHandler.cs +++ b/Migration.Toolkit.Core.K11/Handlers/MigrateUsersCommandHandler.cs @@ -38,7 +38,7 @@ public async Task Handle(MigrateUsersCommand request, Cancellatio await using var k11Context = await k11ContextFactory.CreateDbContextAsync(cancellationToken); var k11CmsUsers = k11Context.CmsUsers - .Where(u=> u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Admin || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Editor || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.GlobalAdmin) + .Where(u => u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Admin || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Editor || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.GlobalAdmin) ; foreach (var k11User in k11CmsUsers) diff --git a/Migration.Toolkit.Core.KX12/Handlers/MigrateMembersCommandHandler.cs b/Migration.Toolkit.Core.KX12/Handlers/MigrateMembersCommandHandler.cs index be8a07f3..ae977144 100644 --- a/Migration.Toolkit.Core.KX12/Handlers/MigrateMembersCommandHandler.cs +++ b/Migration.Toolkit.Core.KX12/Handlers/MigrateMembersCommandHandler.cs @@ -14,7 +14,6 @@ using Migration.Toolkit.Core.KX12.Contexts; using Migration.Toolkit.Core.KX12.Mappers; using Migration.Toolkit.KX12.Context; -using Migration.Toolkit.KXP.Api.Auxiliary; using Migration.Toolkit.KXP.Api.Enums; namespace Migration.Toolkit.Core.KX12.Handlers; diff --git a/Migration.Toolkit.Core.KX12/Handlers/MigrateUsersCommandHandler.cs b/Migration.Toolkit.Core.KX12/Handlers/MigrateUsersCommandHandler.cs index fa9f92c2..2783eaea 100644 --- a/Migration.Toolkit.Core.KX12/Handlers/MigrateUsersCommandHandler.cs +++ b/Migration.Toolkit.Core.KX12/Handlers/MigrateUsersCommandHandler.cs @@ -11,7 +11,6 @@ using Migration.Toolkit.Common.MigrationProtocol; using Migration.Toolkit.Core.KX12.Contexts; using Migration.Toolkit.KX12.Context; -using Migration.Toolkit.KXP.Api.Auxiliary; using Migration.Toolkit.KXP.Api.Enums; using Migration.Toolkit.KXP.Models; @@ -38,7 +37,7 @@ public async Task Handle(MigrateUsersCommand request, Cancellatio await using var kx12Context = await kx12ContextFactory.CreateDbContextAsync(cancellationToken); var k12CmsUsers = kx12Context.CmsUsers - .Where(u=> u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Admin || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Editor || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.GlobalAdmin) + .Where(u => u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Admin || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Editor || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.GlobalAdmin) ; foreach (var k12User in k12CmsUsers) diff --git a/Migration.Toolkit.Core.KX13/Handlers/MigrateMembersCommandHandler.cs b/Migration.Toolkit.Core.KX13/Handlers/MigrateMembersCommandHandler.cs index 04518f3f..f64a4c63 100644 --- a/Migration.Toolkit.Core.KX13/Handlers/MigrateMembersCommandHandler.cs +++ b/Migration.Toolkit.Core.KX13/Handlers/MigrateMembersCommandHandler.cs @@ -14,7 +14,6 @@ using Migration.Toolkit.Core.KX13.Contexts; using Migration.Toolkit.Core.KX13.Mappers; using Migration.Toolkit.KX13.Context; -using Migration.Toolkit.KXP.Api.Auxiliary; using Migration.Toolkit.KXP.Api.Enums; namespace Migration.Toolkit.Core.KX13.Handlers; diff --git a/Migration.Toolkit.Core.KX13/Handlers/MigrateUsersCommandHandler.cs b/Migration.Toolkit.Core.KX13/Handlers/MigrateUsersCommandHandler.cs index bd1717d1..01e1937f 100644 --- a/Migration.Toolkit.Core.KX13/Handlers/MigrateUsersCommandHandler.cs +++ b/Migration.Toolkit.Core.KX13/Handlers/MigrateUsersCommandHandler.cs @@ -11,7 +11,6 @@ using Migration.Toolkit.Common.MigrationProtocol; using Migration.Toolkit.Core.KX13.Contexts; using Migration.Toolkit.KX13.Context; -using Migration.Toolkit.KXP.Api.Auxiliary; using Migration.Toolkit.KXP.Api.Enums; using Migration.Toolkit.KXP.Models; @@ -38,7 +37,7 @@ public async Task Handle(MigrateUsersCommand request, Cancellatio await using var kx13Context = await kx13ContextFactory.CreateDbContextAsync(cancellationToken); var kx13CmsUsers = kx13Context.CmsUsers - .Where(u=> u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Admin || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Editor || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.GlobalAdmin) + .Where(u => u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Admin || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.Editor || u.UserPrivilegeLevel == (int)UserPrivilegeLevelEnum.GlobalAdmin) ; foreach (var kx13User in kx13CmsUsers)