From 3a3894d532bd2730a1d83cc1961acd73173df0a7 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 19 Sep 2018 14:50:49 +0000 Subject: [PATCH] --- server/AyaNova/biz/Search.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/AyaNova/biz/Search.cs b/server/AyaNova/biz/Search.cs index c76f919f..28c9313f 100644 --- a/server/AyaNova/biz/Search.cs +++ b/server/AyaNova/biz/Search.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.IO; using Newtonsoft.Json.Linq; using Microsoft.Extensions.Logging; +using Microsoft.EntityFrameworkCore; using AyaNova.Util; using AyaNova.Models; @@ -34,8 +35,9 @@ namespace AyaNova.Biz public static void ProcessDeletedObjectKeywords(AyContext ct, long objectID, AyaType objectType) { - throw new System.NotImplementedException("Search::ProcessDeletedObjectKeywords NOT CODED YET"); - //ProcessKeywords(ct, localeId, objectID, objectType, false, name, text); + //Be careful in future, if you put ToString at the end of each object in the string interpolation + //npgsql driver will assume it's a string and put quotes around it triggering an error that a string can't be compared to an int + ct.Database.ExecuteSqlCommand($"delete from asearchkey where objectid={objectID} and objecttype={(int)objectType}"); }