score:0
Accepted answer
var query = (
from a in db.record_holddata
join b in db.flavortable on
a.flavorid equals b.id
where a.holdstatus == "open"
select
new
{
a.dateopened,
a.field1,
a.field2,
...
b.flavorname
})
.tolist();
Source: stackoverflow.com
Related Query
- linq to sql c#: replace a foreign key with its string value and keep the table structure
- Storing result of linq in keyvaluepair with key and value after spliting the String using comma seperator
- How to query values associated with the foreign key using linq and display in listview
- Add row to Entity Framework with hidden foreign key table and Linq
- How do i obtain foreign table field using string value for fieldname with reflection and entity framework
- How to delete a row in a table and all its foreign key relationships with Entity Framework?
- Linq and EF: Querying to get results on one to many relationships: Selecting table with foreign Key
- How to convert data in sql table into datetime and compare with other value in linq
- Query a SQL Server table with multiple variables using LINQ and C# and return the results
- Convert an array to dictionary with value as index of the item and key as the item itself
- Create Dictionary with LINQ and avoid "item with the same key has already been added" error
- How to insert a record with LINQ and C# and return the Primary Key of that record
- How to flatten a dictionary<string,List<string>> in linq and keep the key in the results
- Linq to Entities, Table per Type and Nullable Foreign Key Relationships
- Intersect two lists and return the similarity with the preserved order of the original first string value
- Split string and set default value if separator not found WITH LINQ
- What are the prerequisites for using SQL and LINQ with my winforms application in C#?
- Linq to Sql with the And operator on the same field
- Is possible with LINQ to extract from an array of objects the value of one property and create a new array?
- Foreign Key Reference Already Has Value Exception Linq to SQL When Assigning Null
- How to get the value of class properties with Linq query and IEnumerable
- Need help with LINQ to SQL WHERE-clause on foreign table
- linq sql find duplicates but take null and empty string as the same
- Find an attribute that contains a ceratin string and modifying its Value in c# using LINQ
- Regex or Linq to capture the key and value pair in c#
- c# find item in list returned by LINQ query and compare its value with another item in list
- Get foreign key table with a single query using LINQ
- C# Finding the maximum value of a string with linq
- Determine if foreign key table has any links to primary key table with LINQ & DataTable
- Get first value from table with where either have the value match or null with LINQ
More Query from same tag
- Linq Nhibernate : Unable to pull a value from a foreign key table
- LINQ query from two related lists with specific criteria
- Gridview Error Data Contains No Rows when Used with Linq
- Linq FirstOrDefault returning multiple
- Selecting subset of innermost Descendants using LINQ to XML
- LINQ: Finding an item in a List which contains List of items
- Performing a GROUP BY query in Entity Framework from a SQL GROUP BY statement
- linq creates new anonymous object; how to declare return type
- Fetch data using LINQ query with left join and AsExpandable()
- SQL to Linq Where Case Statement
- Unable to create a constant value of type 'System.Char'
- Two different data types in a foreach loop
- Nhibernate throws Object of type 'System.Linq.EnumerableQuery`1[Entity]' cannot be converted to type 'System.Linq.IQueryable`1[System.Object[]]'
- LINQ Join query problem
- How to do Linq GroupJoin on self to fill children/parent properties?
- Using a LINQ Where query to get only some of the ConfigurationManager.ConnectionStrings
- Does LINQ convert code to SQL queries
- How to strip blocks out of an IEnumerable?
- How do we switch from Telerik Open Access to anything else?
- How do I extract a value from XML using LINQ?
- Faster version of LINQ .Any() and .Count()
- Most maintainable way to search in various columns
- LINQ and CASE Sensitivity
- Translation exception difference in EF Core's different Linq queries
- Dynamic Linq Expression Query Nested List Object
- C# Linq with DateTime field
- MVC CSV Import and calculate
- LINQ OrderBy - passing parameter
- Simple linq question: How to filter a source afterwards?
- LINQ query doesn't give any results (finding which interval a number belongs to)