sounds like you probably want:
var next = table.where(item => item.id > lastid && item.projects_id == projects_id && item.language == language) .orderby(item => item.id) .firstordefault();
or as a query expression:
var next = (from item in table where item.id > lastid && item.projects_id == projects_id && item.language == language orderby item.id select item).firstordefault();
the result will be
null if there are no matches (e.g. if you're already looking at the last id). this is assuming by "next" you mean "matching item with the lowest id greater than the current one".
- LINQ Query - Get the next row with matching parameters
- Get next element from Query after element with specified Id. The LINQ expression could not be translated
- How do I get the MAX row with a GROUP BY in LINQ query?
- Get excel cell value with Row and Column Position through open xml sdk linq query
- LINQ - Writing an extension method to get the row with maximum value for each group
- How to get the value of class properties with Linq query and IEnumerable
- Get row with minimum datetime by LINQ query
- What SQL query or LINQ code would get the following data?
- How to get this linq query to access info from the previous row
- How to get the next match from a MatchCollection following after a specific Capture.Index with Linq
- In a LINQ with a select can I compare forward to the next row and decide what to select?
- Get different results with the same query in T-SQL and LINQ (EF Core)
- Unable to get linq query data in the async ActionResult with await and task, Error: await can't be used with async method
- Get the row with the max(DateTime) LINQ
- how to get first object when the name is the same and Id is different with linq query
- linq query to get the latest record with default if empty returning list
- Get the Value of WPF Listview rows and compare them with database field using Linq query
- Linq query to take the value from Array with matching sub string value
- How do I get the max ID with Linq to Entity?
- LINQ to SQL: GroupBy() and Max() to get the object with latest date
- How to get the TSQL Query from LINQ DataContext.SubmitChanges()
- How to get the item before current and after current in a dictionary with Linq / C#?
- Can't get c# linq query to compile with joins
- linq to sql query with multiple where parameters
- How to get the latest date inserted from the table with Linq to entities
- How to get the Max() of a Count() with LINQ
- Linq query to get the distinct values in a list
- Using a LINQ Where query to get only some of the ConfigurationManager.ConnectionStrings
- LINQ with subselect and groupby to get only the latest version of each item in a list
- How to use C# LINQ Union to get the Union of Custom list1 with list2
More Query from same tag
- Recursive LINQ calls
- Silverlight: App.Current.Resources is empty
- How to get a Lookup from nested dictionaries
- In .NET, is it better to call .Count() or, when available, .Count?
- C# List<T> OrderBy float member
- I can't seem to be able to access a Dictonary<string, object> values while building a dynamic linq expression
- How to find max value for each column using LINQ (vb.net)
- The EntityKey property can only be set when the current value of the property is null
- How to group items in a list with the same max date and filter them
- Sum properties using LINQ
- Any() in a Chained Linq expression
- LINQ to Entities does not recognize the method 'Char get_Chars(Int32)' method, and this method cannot be translated into a store expression
- SQL to LINQ in C# (query with several tables and alias)
- How Except in linq works when comparing entities?
- Get indexes of all matching values from list using Linq
- How to serialize a ViewState objects
- update xml using xdocument
- Two generic types in a extension method
- Transpose a List<T> using c#
- Querying many-To-many relationship with a list of parameters
- Get the Common data from the List
- Convert VB.Net Linq statement to C#
- LINQ expression duplicates values on select instead of cycling them
- Is there a way to add data into a linking table of a many to many relationship in ASP.NET MVC?
- Using LINQ to query XML file
- Running different code depending on what Net Framework version is installed
- Compare two collections with linq and populate variable
- SQL GROUP BY with MAX as Linq?
- Joining specific 2 rows of existing list using linq