Repositories: Quote table and columns and use NPoco extensions over raw SQL (#20034)
* fix sql syntax issues * unify all dtos, fix autoIncrement for NPoco.Insert and .BulkInsert * fix Copilot review comments * fix sql syntax in TrackedReferencesRepository.GetPagedDescendantsInReferences() * remove changes in TemplateServiceTests * Tweaks and fixes from first review. * Reverted changes outside scope of PR. * Use FirstOrDefault over SelectTop. * Fix delete member issue. * Fixed issue with create of webhooks. * Reverted changes to default data install. * Removed unused method. * Rationalised use of quoting helpers. * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix nullability issue. --------- Co-authored-by: Andy Butland <abutland73@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -37,7 +37,7 @@ internal static class UmbracoDatabaseExtensions
|
||||
// create the wildcard where clause
|
||||
ISqlSyntaxProvider sqlSyntax = database.SqlContext.SqlSyntax;
|
||||
var whereParam = sqlSyntax.GetStringColumnWildcardComparison(
|
||||
sqlSyntax.GetQuotedColumnName("key"),
|
||||
sqlSyntax.GetColumn(database.SqlContext.DatabaseType, KeyValueDto.TableName, "key", null),
|
||||
0,
|
||||
TextColumnType.NVarchar);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user