I have this in my query:
var result = (from url in _context) URLs are equivalent to joining documents in _context.Documents in urcon.UrlId documents.DocumentId = words in words (_context.Words). Hits in _context.Hits on words.WordId is equal to hits.WordId where hits. DocumentId == selection of documents.DocumentId .text) .AsEnumerable & LT; String & gt; () Where urls.ResolvedPath.Contains (breakedQuery, KeywordParts.Url, part) || Documents.Title.Contains (breakedQuery, KeywordParts.Title, part) || Documents.Keywords.Contains (breakedQuery, keyword Keywords, Part)] Documents. description. Includes (breakdise, keywordparts, description, part). word. (Breakside, keyword stuff, part) ... and extension method is included:
for strings
enumerables (the main method ) and throws the method using the exception NotSupportedException:. Method 'Boolean (String, IEnumerable`1 [String], KeywordParts, KeywordParts)' is a supported translation for SQL Actually I want to check each indexed document if The lease is one of the specified circumstances
public This includes static bool (this is IEnumerable & lt; string & gt; source, ienumerable & lt; string & gt; value, keyword tarts, keyword part part) {if (source! = Null & source quote () & gt; 0 & amp; amp; value! = Null & amp; amp; value; count ()> 0 & amp; amp;; amp; (part == KeywordParts.Anywhere || valuePart == part)) { Foreach (var value in value) {var is = false; var none = (value.StartsWith ("-"); string word = value. Change ("-", ""); If (none) = source is there. Any (q = & gt; q.Contains (value)); The other has = source. Any (q = & gt; q.Contains (value)); If (is) is the return; } } return false; }
You can not just write your own methods and Query can call with expression - query translator does not know this B What is meant by that method.
After receiving the documents and the words, the clause is likely to be executed on the Net ... although it obviously means that all < Is it okay to add / em> the data to the database?
To do this, you want to like something:
var in tmpQuery = (_context.Urls) Join documents in the _context url on the document. UrlId documents.DocumentId is equivalent to hits hits.WordId on words.WordId on words.WordId is included in words = (_context.Words) where select hits.DocumentId == documents.DocumentId words.Text) New {URL Selecting equals, documents, words}; var query = r in tmpQuery.AsEnumerable () urls = r.urls.ToList () Let's put words = r.words.ToList () to two documents = r.documents. ToList () where urls.ResolvedPath. (BreckCaklai, Quadwords. URL, Part) || Document. WordParts.Title, Part) || Document .keyword.Sc (breakdise, keywordpress.keyword, part) || Documents.Description.Contains (breakedQuery, KeywordParts.Description, part) || Select words (breakclaims, keywordparts, content, parts) new (url, word, document);
Comments
Post a Comment