This commit is contained in:
@@ -414,6 +414,10 @@ namespace AyaNova.Biz
|
|||||||
//BUILD A LIST OF MatchingDictionaryEntry items FOR THE MATCHING WORDS
|
//BUILD A LIST OF MatchingDictionaryEntry items FOR THE MATCHING WORDS
|
||||||
List<MatchingDictionaryEntry> MatchingKeywordIdList = new List<MatchingDictionaryEntry>();
|
List<MatchingDictionaryEntry> MatchingKeywordIdList = new List<MatchingDictionaryEntry>();
|
||||||
|
|
||||||
|
|
||||||
|
//######### FROM HERE NEEDS TO LOCK SEARCHDICTIONARY FROM HERE TO ADDING NEW WORDS
|
||||||
|
using (var transaction = ct.Database.BeginTransaction())
|
||||||
|
{
|
||||||
//ITERATE ALL THE KEYWORDS, SEARCH IN THE SEARCHDICTIONARY TABLE AND COLLECT ID'S OF ANY PRE-EXISTING IN DB KEYWORDS
|
//ITERATE ALL THE KEYWORDS, SEARCH IN THE SEARCHDICTIONARY TABLE AND COLLECT ID'S OF ANY PRE-EXISTING IN DB KEYWORDS
|
||||||
var ExistingKeywordMatches = ct.SearchDictionary.Where(m => KeyWordList.Contains(m.Word)).ToDictionary(m => m.Id, m => m.Word);
|
var ExistingKeywordMatches = ct.SearchDictionary.Where(m => KeyWordList.Contains(m.Word)).ToDictionary(m => m.Id, m => m.Word);
|
||||||
//Put the matching keyword ID's into the list
|
//Put the matching keyword ID's into the list
|
||||||
@@ -445,6 +449,10 @@ namespace AyaNova.Biz
|
|||||||
ct.SaveChanges();
|
ct.SaveChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
transaction.Commit();
|
||||||
|
}//end transaction
|
||||||
|
//#########################
|
||||||
|
|
||||||
|
|
||||||
//-----
|
//-----
|
||||||
//Now add the id's of the newly created words to the matching keyword id list for this object
|
//Now add the id's of the newly created words to the matching keyword id list for this object
|
||||||
|
|||||||
@@ -236,7 +236,20 @@ namespace raven_integration
|
|||||||
var ErrorMessage = string.Empty;
|
var ErrorMessage = string.Empty;
|
||||||
var ERR = a.ObjectResponse["error"];
|
var ERR = a.ObjectResponse["error"];
|
||||||
if (ERR != null)
|
if (ERR != null)
|
||||||
ErrorMessage = ERR.Value<string>();
|
{
|
||||||
|
var ecode = ERR["code"];
|
||||||
|
if (ecode != null)
|
||||||
|
ErrorMessage += $"CODE: {ecode} ";
|
||||||
|
|
||||||
|
var emsg = ERR["message"];
|
||||||
|
if (emsg != null)
|
||||||
|
ErrorMessage += $"MESSAGE: {emsg} ";
|
||||||
|
|
||||||
|
var etarget = ERR["target"];
|
||||||
|
if (etarget != null)
|
||||||
|
ErrorMessage += $"TARGET: {etarget} ";
|
||||||
|
}
|
||||||
|
|
||||||
a.ObjectResponse["error"].Should().BeNull("because there should not be an error on an api call, error was: {0}", ErrorMessage);
|
a.ObjectResponse["error"].Should().BeNull("because there should not be an error on an api call, error was: {0}", ErrorMessage);
|
||||||
a.ObjectResponse["result"].Should().NotBeNull("A result should be returned");
|
a.ObjectResponse["result"].Should().NotBeNull("A result should be returned");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user