From 39b1de4a98c5d009bb607370fb6dc2590698b1aa Mon Sep 17 00:00:00 2001 From: nzdev <834725+nzdev@users.noreply.github.com> Date: Mon, 7 Dec 2020 23:29:13 +1300 Subject: [PATCH] avoid capture class --- .../Repositories/Implement/RelationRepository.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/RelationRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/RelationRepository.cs index a0dbea5944..eab77ffbc6 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/RelationRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/RelationRepository.cs @@ -291,8 +291,8 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var template = SqlContext.Templates.Get(Constants.SqlTemplates.RelationRepository.DeleteByParentIn, tsql => Sql().Delete() .From() .InnerJoin().On(x => x.RelationType, x => x.Id) - .Where(x => x.ParentId == SqlTemplate.Arg(nameof(parentId))) - .WhereIn(x => x.Alias, SqlTemplate.ArgIn(nameof(relationTypeAliases)))); + .Where(x => x.ParentId == SqlTemplate.Arg("parentId")) + .WhereIn(x => x.Alias, SqlTemplate.ArgIn("relationTypeAliases"))); Database.Execute(template.Sql(new { parentId, relationTypeAliases })); } else @@ -301,7 +301,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var template = SqlContext.Templates.Get(Constants.SqlTemplates.RelationRepository.DeleteByParentAll, tsql => Sql().Delete() .From() .InnerJoin().On(x => x.RelationType, x => x.Id) - .Where(x => x.ParentId == SqlTemplate.Arg(nameof(parentId)))); + .Where(x => x.ParentId == SqlTemplate.Arg("parentId"))); Database.Execute(template.Sql(new { parentId })); } }