score:7
Accepted answer
you could try this one:
list<stockresult> stockres = item.where(x=>db.stk.any(a => a.ino == x.itemnum))
select(x=> new stockresult()
{
itemnumber = x.itemnum,
filename = x.filename
}).tolist();
Source: stackoverflow.com
Related Query
- How to simplify the code Using LINQ
- How can I write the following code more elegantly using LINQ query syntax?
- How to write this code using the Linq Extension Method-Syntax?
- How can I check the number of calls to the database in LINQ query when using .NET Core and Code First?
- Simplify the following code to a one-liner using Linq queries
- How can I simplify (speed up) the selecting query from a database that contains more than 1 million records using LINQ
- How can I filter a dictionary using LINQ and return it to a dictionary from the same type
- how to update the multiple rows at a time using linq to sql?
- How do I find the text within a div in the source of a web page using C#
- How do I count the number of child collection's items using LINQ Method Syntax?
- How to understand the following C# linq code of implementing the algorithm to return all combinations of k elements from n
- How to get all elements except the n'th element in a List using Linq
- How to find the first item according to a specific ordering using LINQ in O(n)?
- When using a LINQ Where clause on a Dictionary, how can I return a dictionary of the same type?
- Left outer join using LINQ -- understanding the code
- How can I simplify Linq extension method invokation using reflection?
- How to reuse a linq expression for 'Where' when using multiple source tables
- LINQ: How to do JOIN using the linq extension method style on multiple fields?
- How does linq actually execute the code to retrieve data from the data source?
- How do I pass a method as the parameter of another method using linq expressions
- How do I alter the contents of IDictionary using LINQ (C# 3.0)
- How to find the index of next matching element in list using LINQ
- how to change the value of dictionary using linq based on key?
- Using the magic of LINQ - How to call a delegate for each criteria that matches?
- How to rename data using Linq based on the location of elements?
- How can I further simplify this piece of LINQ code
- How can I code an outer join using LINQ and EF6?
- How to group only subsequent items with the same property using linq
- How to get the value of an XML element using Linq even when empty
- How to code the partial extensions that Linq to SQL autogenerates?
More Query from same tag
- Linq Group By Key seems to be "expanding" my result set
- Dynamic linq query with multiple/unknown criteria
- Linq Select unique items from groups and get similar item by ID
- Efficient way to remove items from dictionary
- DbContext ExecuteSqlRaw missing parameters error
- Why doesn't LINQ's First method simply return null if no item is found?
- EntityFramework, getting Object ID while added to table
- List Array to DataTable
- c# Search For XML Element Value Based On Array or List
- Generic Types and LINQ
- Use where in row collection in Entity Framework
- Use enum in LinQ
- Get one field value from LINQ query
- Adding records to a result set via a LINQ statement and calculation
- How do I order a Group by and Order by a result using Linq
- Enumerable.Cast<T> extension method fails to cast from int to long, why?
- Create a XML File from a list based on a conditional
- Linq Syntax issue
- Using LINQ to transform Date into a WeekDay and Week of Month
- Obtain ToTraceString() for IQueryable
- Use LINQ for double-nested OData collection
- query for top child items with Entity Framework (DbSet)
- Add items to list from linq var
- LINQ sum and groupby and return empty records?
- Linq to XML - Namespaces
- LINQ - Get all items in a List within a List?
- the point of the Field extension method
- Linq Get Latest Date Query
- LINQ 3 Inner Joins with 1 Left Outer Join
- Return anonymous type results when using linq