try this query, just this query.
var results2 = this.account_trans .include(at => at.account_table1) .include(at => at.account_table2) .include(at => at.account_table3) .include(at => at.account_table4) .where(at => this.account_trans .where(a => at.completion_date.value.day == date.day && a.completion_date.value.month == date.month && a.completion_date.value.year == date.year) .select(a => a.fk_account).contains(at.fk_account)) .tolist();
- C# Linq to find a record that matches a condition, if that record is found return all related records
- Finding first index of element that matches a condition using LINQ
- LINQ return items in a List that matches any Names (string) in another list
- How to insert a record with LINQ and C# and return the Primary Key of that record
- Linq to return records that don't have a follow up record
- using linq query to find value that differs from previously found value
- How to find the next greater available record in SQL if the one that I entered is not found
- How do I do a linq query to find fields in a dataset that are present in every record of a set?
- Linq code doesn't return correct record
- Linq XML query - How do I return a node that meets a condition within its own nested nodes?
- How to see a record that has a key that matches the previous records key in XML using LinQ to XML?
- Using Linq to find the line that matches an entry
- Linq statement return error when no record found
- C#: Return any item that matches the condition
- How can I find that a record successfully deleted from Db using LINQ
- LINQ - Find all items in one list that aren't in another list
- How are people unit testing code that uses Linq to SQL
- How to return anonymous type from c# method that uses LINQ to SQL
- How to count the number of elements that match a condition with LINQ
- Using LINQ to Objects to find items in one collection that do not match another
- LINQ Lambda - Find all ID's in one list that don't exist in another list
- Find next record in a set: LINQ
- LINQ to find the closest number that is greater / less than an input
- select object which matches with my condition using linq
- linq deferred execution when using locks in methods that return IEnumerable
- Using Linq to find duplicates but get the whole record
- Is there a good source that gives an overview of linq optimizations?
- How to understand the following C# linq code of implementing the algorithm to return all combinations of k elements from n
- Using LINQ to find all keys from one collection that are not in another?
- Linq cannot find inserted record before submitchanges
More Query from same tag
- calling generic methods with custom objects from list (automate)
- Return cell with value not null using linq - Epplus
- Identify common Lists in List and return Distinct Lists in List
- Specified cast is not valid when using casting
- I got a null reference exception on a Linq To SQL data context and I don't even really know where to start
- What is the difference between Joining two different DB Context using ToList() and .AsQueryable()?
- C# Combine two lists with nested lists into one using LINQ
- LINQ to SQL: intermittent AccessViolationException wrapped in TargetInvocationException
- Removing digital Signature tags from an xml file
- how to search string in Linq to SQL using contains
- C# Dictionary of Dictionaries returns null value from select when matched on key reference
- Dynamic LINQ. No property or field 'FieldName' exists in type 'ClassName'
- LINQ query null reference exception
- how to check next item in linq 2 sql query
- Group outer collection based on a property value of nested (inner) collection
- Send Option Value to a global variable on view
- I want to get right value from list
- How to write Outer Join using LINQ
- Joining to Lists via LINQ
- MVC LINQ Sort / OrderBy a Model
- How to Filter a Query On a One to Many Relationship via Linq
- Dynamics CRM 2011 - Filtering LINQ query with outer joins
- Find partial duplicates in a table with linq
- Getting SQL string from LINQ to EF query
- Partial Search in Linq for space separate values
- How can I use my model properties in a Linq query?
- Internal access for entities in Entity Framework makes simple linq where query crash
- Using Entity Framework constructors in derived classes
- LINQ Confusion - Database not persisting after the application closes?
- What's the best way to query specific data when by an element inside it?