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 Query
- Linq code to select one item
- How are people unit testing code that uses Linq to SQL
- SELECT COUNT in LINQ to SQL C#
- How to write linq query to match SQL like select top 100 * from tab?
- Select top 1 result from subquery in linq to sql
- EF Core nested Linq select results in N + 1 SQL queries
- Linq To SQL Select Dynamic Columns
- LINQ select on a SQL View gets wrong answer
- Linq to SQL Group by and Sum in Select
- LINQ to SQL . how to select all record using .take()
- LINQ to SQL - select where text like string array
- Linq to SQL select multiple columns
- LINQ to SQL Select Distinct by Multiple Columns and return entire entity
- Stop LINQ to SQL from executing select statements after insert
- LINQ Source Code Available
- Manually select related table data (SELECT N + 1 problem) LINQ to SQL
- Expression in select in LINQ to SQL
- linq to sql select as command
- LINQ to SQL join 3 tables and select multiple columns and also using Sum
- How to code the partial extensions that Linq to SQL autogenerates?
- Select "IN" in LINQ to SQL
- Determine the source DataContext for a Linq to Sql query
- Linq to sql select new string
- Randomly Select Records Using Linq to SQL
- How to get SQL query into LINQ form in C# code
- How to concatenate two columns in linq to sql query's select projection
- How can I select all in linq to sql
- creating Linq to sqlite dbml from DbLinq source code
- Does LINQ convert code to SQL queries
- How do i convert this linq code to inline sql
More Query from same tag
- LINQ group items into lists in anonymous type, with duplicates
- Entity Framework VS pure Ado.Net
- Linq exception on Provider.CreateQuery
- Get 3 random values from a Dictionary (with tuple string[]) without duplicates
- C# Build where clause dynamically in Linq? for RavenDB
- Execute method within linq
- Linq most efficient method
- I have some problems with LINQ expression, OrderBy(), Skip(), Take() works incorrect
- linqpad error using Rx Reactive extensions in c#
- Strongly typed dynamic Linq sorting
- 'object' does not contain a definition for 'type'
- Group by and MIN() in LINQ
- Creating a Linq expression dynamically containing a subquery
- Distinct Count x and Grouping by Date y
- Converting a LINQ result to 2D string array
- How to generate xml file with specific structure from datatables?
- Translating XPath to LINQ
- What is the Efficiency and Performance of LINQ and Lambda Expression in .Net?
- Collections manipulation, need help optimizing this code from a report generator
- Linq Query return a Concat of Dates to String?
- .Where in list gives error for using dynamic types in 2sxc
- How to use Date function in LINQ to entities?
- Getting the Object From IGrouping in c#
- Is it possible to cancel select and 'Continue' within .Select statement upon a condition?
- LINQ query, selecting latest value with group by - Unsupported method
- Unit Testing with Moq sometimes fails on ToListAsync()
- Query against a Deserialized JSON object
- Query DTO objects through WCF with linq to sql backend
- Getting Distinct rows with LINQ
- LINQ Join (Left Outer) with Take(1)