So what your trying to do per your comment
yes. Assuming: the Post A has tag1, tag2 and tag3. The post B has tag1, tag3. If the string array includes tag1 and tag2, the Post A should be selected.
var posts = dbConxtext.BlogPosts.Where(x => tags.All(t => x.TagsForBlogPost.Any(y => y.Tag.TagName == t)));
So make sure that All of the
tags are contained in
Warning, this may produce terrible SQL
- Entity Framework Code First - Get blog posts which have certain tags
- Entity Framework 6 Code First Custom Functions
- Entity Framework Code First without app.config
- Entity Framework Code First using context in Controller
- many to many mapping in entity framework code first
- How to Create a Run-Time Computed (NotMapped) Value in Entity Framework Code First
- updating data in many-to-many relationship in entity framework in code first existing database
- Entity Framework Code First String Comparison with Oracle Db
- SQL subquery result in LINQ and Entity Framework Code First
- most efficient Entity Framework Code First method of flattening / projecting parent entity with specific child
- How to Query Icollections of Entity Framework Code First Data
- Entity Framework code first - Many to Many - Include conditional
- Entity Framework Code First ToList method timing out on SQL Azure
- How to make a property unique in Entity Framework Code First
- Entity Framework Code First override onModelCreating() for TPT Inheritance Screwing Up Identity User and Role Models
- How to loop through a child list of objects in Entity Framework 4.1 code first
- A method that searches for entities, a certain property of which matches a given criteria in Entity Framework
- how to select data by linq in many-to-many relationship in First code Entity framework 5
- Why Entity Framework Code First one to many Doesn't work properly
- LINQ - Entity framework code first - Grouped results to custom class
- map one to one with multiple primary key columns entity framework code first
- Does Linq in Entity Framework code first use SQL or does it get the whole table first?
- How to get first row from DB using Entity Framework where column starts with certain string and continues with numeric characters
- Fixing Loop Reference in Entity Framework Code First when Serializing to Json
- Entity Framework Query to prefer a certain field value, if not select first or default
- IQueryable two tables from Code First Entity Framework
- Entity Framework Code First Select Item Based on Relationship
- Getting InvalidCastException when trying to implement sorting in Entity Framework Code First using Linq
- c# WPF bind combobox to TPH in Entity Framework code first using LINQ
- Proper Linq Query for objects with many to many relation ship generated with code first entity framework
- LINQ/Lambda equivalent to SQL NOT IN
- What is the best way to order a list by numeric field and put objects with value of 0 at the bottom?
- In C# Groupby Select using a ForEach or other function to aggregate one column into a array of results
- How to refresh a C# DataTable with updated data due to adding to table with autoincrement?
- How to get new record in SQL Server or C# by checking if id exists
- How can I optimize this LINQ statement for speed?
- how to display orderby descending in LinQ
- How ToLookup() with multiple indexes?
- DataTable's NewRow() method causes re-evaluation of LINQ expression after being used as a BindingSource with AsDataView()
- Get the column name from list
- Get the distinct items from an IEnumerable<T>
- Linq to Entity insert data in db
- Functional way to enumerate enumerable if it contains any items
- DataBinding: 'System.Xml.linq.XElement' does not contain a property with the name 'colorName'
- Sort List of SelectListItem with LINQ
- When is data loaded into app server's memory?
- Select query on type to transform it into its sub type using Linq
- Determine if a sequence contains all elements of another sequence using Linq
- How to filter the Application.OpenForms collection with Linq?
- LINQ to Stored Procedure. Can I call the SP with a dynamic list of parameters instead of strongly typing them?