score:2
Accepted answer
var query = a.where(p=> p.usercode == d).select(x=> x.scheduleid);
var count = a.count(p=> query.contains(p.scheduleid));
score:2
int count = (from q1 in a
join q2 in a on q1.scheduleid equals q2.scheduleid
where q2.usercode == "d"
select q1).count();
Source: stackoverflow.com
Related Query
- Linq query to get count with multiple column values coming from condition on another column
- linq query to join two tables and get the count from one table values from the other
- Linq query to get get count from multiple tables
- linq query to get count from multiple tables
- linq query to get multiple datatable from dataset based on some condition
- Linq Get count from multiple where condition
- How to get multiple column value from database into a list using LINQ query
- How can I set properties on all items from a linq query with values from another object that is also pulled from a query?
- LINQ - get total count of values from nested list
- Get excel cell value with Row and Column Position through open xml sdk linq query
- LINQ to SQL: Complicated query with aggregate data for a report from multiple tables for an ordering system
- how to get values from var-source with linq
- Linq query with multiple count
- Linq query and multiple where clauses with OR only first condition gets evaluated
- Using Linq to return the count of items from a query along with its resultset
- LINQ Count multiple values from a collection
- Linq query to get all values from between two dates
- How do I get values from SelectedItem in ComboBox with Linq and C# 3.5
- Linq query with GROUP BY on multiple fields, SUM and COUNT
- how to get two column values in a single query using linq to entities
- How to filter LINQ query by table column and get count
- Query with LINQ where Context matches multiple parameters from a List of Objects
- Linq query with select needed to get specific properties from a list
- How to get List of results from list of ID values with LINQ to SQL?
- Reading values from a DataTable column into a List<string> with LINQ
- Lambda LINQ query with multiple from clauses
- Linq query for distinct data from a table with where condition
- Get the max date from linq with mutiple joins and with multiple select fields
- Group by column to count duplicated values from another column in LINQ WPF
- LINQ get a record with max date from multiple joins
More Query from same tag
- Is it possible to build an XML recursively without using any LINQ queries?
- EF Core translate to LINQ mix of MAX(Last) GROUP BY, Contains and WHERE
- select field from dictionary table using join in Linq
- Get value in foreach-loop
- Linq for sorting C#
- Can I use LINQ to compare what is missing, added or updated between two collections
- LINQ - Left join and Group by and Sum
- Join 3 tables in .net core entity framework
- distinct set operator in linq
- ASP.Net MVC error creating model for 2 linked tables
- LINQ to XML with multiple namespaces
- How to use a Distinct on a column using Linq
- Select only a portion of a column
- Check Directories in C# using Linq
- Counting Database records that meet criteria and displaying in view
- Difference between IList<T> and List<T>
- Using Linq to Entities to Return Records that Match a List of Possible Strings
- Assign Value in List using lambda expression
- not strongly typed view problem
- Dynamic filter with LINQ (EntityFramework)
- SQL running sum for an MVC application
- Property or indexer 'AnonymousType#1.FirstName' cannot be assigned to -- it is read only
- Selecting aggregate (grouped) statistics with records in a LINQ-to-Entities Query
- Starting select after specific value
- mvc Groupby and Orderby nested
- How to get the updated record by comparing two list using linq C#
- LINQ method to compare 2 lists
- How do I bind specific columns to a DataGrid using Entity Framework 6?
- how do you convert linq query ToList
- Why are LINQ extensions written in a very difficult to read way?