Watch Pre-recorded Live Shows Here
Why Join
Become a member
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Guhananth S
0
57
0
linq to filter records
May 8 2020 11:57 AM
Hi,
In excel i have read and created data table with columns and rows as shown
Explore value
Insights value
Explore Aggregator
Dataset
Tickets
# Tickets
COUNT
[Ticket Status - Unsorted]
# Tickets
COUNT
so i want to get [Ticket Status - Unsorted] and store in variable
I tried like this
var dataRow = from customer in dt.AsEnumerable()
where customer.Field<string>("Insights value") ==' # Tickets'
select new
{
strInsightsvalue = customer.Field<string>("Insights value"),
strExplorerValue = customer.Field<string>("Explore value"),
strExploreAggregate = customer.Field<string>("Explore Aggregator")
};
it show dataRow=null
or i tried below one
var dataRow = dt.AsEnumerable().Where(x => x.Field<string>("Explore Aggregator") == '# Tickets').FirstOrDefault();
using Datatable for each will take more time , so please help
Reply
Answers (
1
)
what kind of this error
Five records to display on the label