score:2
Actually, due to the clause WHERE 0 = 1
this SQL will return an empty recordset (i.e. correctly mapped in terms of the schema, but with no rows).
The code you give seems correct, but something has convinced the query provider that there can never be a matching row.
Assuming it's not correct in this, I'd look at the column mapping for the id
property. Does it match that of the database correctly?
score:0
Probably your list is coming empty, this is the normal behavior of Linq.
score:0
Try this:
Dim strval As String = ""
Dim strnum(30) As String
strval = "1,2,3,4,5,6,7,9"
strnum = strval.split(",")
originalEventsToUpdate = (from a in Db.tbl_ffk_event where strnum.contains(a.id) select a).tolist
Source: stackoverflow.com
Related Articles
- Linq code to select one item
- LINQ Source Code Available
- creating Linq to sqlite dbml from DbLinq source code
- Avoiding duplicate code in Linq Select method
- How to Select top (5) contributors group by Business type code in c# linq query
- source code for LINQ 101 samples
- How to write aggregate query in LINQ reusing part of the select code
- how to select data by linq in many-to-many relationship in First code Entity framework 5
- How to write C# LINQ code to select based on condition
- LINQ Select mutiply columns as data source for combobox C#
- c# Linq or code to extract groups from a single list of source data
- How to convert a string to C# code in the SELECT of C# LINQ
- How to use LINQ to select object with minimum or maximum property value
- Convert string[] to int[] in one line of code using LINQ
- Async await in linq select
- Select distinct using linq
- LINQ query to select top five
- Linq select objects in list where exists IN (A,B,C)
- Code equivalent to the 'let' keyword in chained LINQ extension method calls
- Select a Dictionary<T1, T2> with LINQ
- LINQ Select Distinct with Anonymous Types
- Select multiple records based on list of Id's with linq
- Select Multiple Fields from List in Linq
- How to select only the records with the highest date in LINQ
- LINQ Using Max() to select a single row
- Create a Tuple in a Linq Select
- LINQ Group By and select collection
- How to select values within a provided index range from a List using LINQ
- How to use Lambda in LINQ select statement
- Return list using select new in LINQ
- Is it possible to define a usable Object Context variable in LINQPad?
- C# LINQ query a Dictionary
- Linq-to-sql One-To-Many with a max
- To find the best Projects depending on the Project Likes, Project Connected and Project Rating
- Is there any way to edit the Values of a Dictionary during iteration?
- How can I use LINQ with a class that has parallel arrays?
- Ranking. Linq to sql question
- select an xml descendants based on a node
- Linq2SQl eager load with multiple DataLoadOptions
- Linq query combine two or three expressions
- Return function for list of id's
- Select all rows from 2 similar tables
- LINQ: How do I select unique rows: max(id) with multiple columns?
- Why is this LINQ query not working correctly?
- Permissions Design
- IEnumerable - Return items in range either side of element
- One liner for concatenation of two different lists of objects with the same interface
- Get list of titles from xml files
- Linq sorting of entity by custom property via reflection
- LINQ Comparing two list and putting the results into one list