avoid capture class

This commit is contained in:
nzdev
2020-12-07 23:29:13 +13:00
parent 38f748c563
commit 39b1de4a98

View File

@@ -291,8 +291,8 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
var template = SqlContext.Templates.Get(Constants.SqlTemplates.RelationRepository.DeleteByParentIn, tsql => Sql().Delete<RelationDto>()
.From<RelationDto>()
.InnerJoin<RelationTypeDto>().On<RelationDto, RelationTypeDto>(x => x.RelationType, x => x.Id)
.Where<RelationDto>(x => x.ParentId == SqlTemplate.Arg<int>(nameof(parentId)))
.WhereIn<RelationTypeDto>(x => x.Alias, SqlTemplate.ArgIn<string>(nameof(relationTypeAliases))));
.Where<RelationDto>(x => x.ParentId == SqlTemplate.Arg<int>("parentId"))
.WhereIn<RelationTypeDto>(x => x.Alias, SqlTemplate.ArgIn<string>("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<RelationDto>()
.From<RelationDto>()
.InnerJoin<RelationTypeDto>().On<RelationDto, RelationTypeDto>(x => x.RelationType, x => x.Id)
.Where<RelationDto>(x => x.ParentId == SqlTemplate.Arg<int>(nameof(parentId))));
.Where<RelationDto>(x => x.ParentId == SqlTemplate.Arg<int>("parentId")));
Database.Execute(template.Sql(new { parentId }));
}
}