Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

entity framework core search keyword query example

// First, put your keywords in something more LINQ-friendly
var keywordGroups = keywords.Select(k => k.Split(' ')).ToArray();

Where(article => keywordGroups.
    Any(keywordGroup => keywordGroup.
        All(keyword => article.Text.Contains(keyword))))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #entity #framework #core #search #keyword #query
ADD COMMENT
Topic
Name
5+4 =