Language Integrated Query (LINQ) Question:
Download Job Interview Questions and Answers PDF
How can you find average of student marks from student tables (Columns are StudentID, Marks)?
Answer:
(C#)
Public void LinqToSqlAverage()
{
var query = (from p in db. student. Marks).Average();
Console.WriteLine(q);
}
Public void LinqToSqlAverage()
{
var query = (from p in db. student. Marks).Average();
Console.WriteLine(q);
}
Download LINQ Interview Questions And Answers
PDF
Previous Question | Next Question |
Write a Program for Concat to create one sequence of Data Rows that contains DataTabless Data Rows, one after the other? | What is “OfType” in linq? |