5
Reply

What is Let in linq?

arvind sharma

arvind sharma

8y
1.2k
0
Reply

    It allows defining a variable and assigning it a value calculated from the data values

    It allows defining a variable and assigning it a value calculated from the data values

    It allows defining a variable and assigning it a value calculated from the data values

    LET keyword allows you to store result of a query which can be used in subsequent query.example :- var em = from e in empgroup e by new { e.Salary, e.Id }into gEmplet avgsal = (gEmp.Sum(t => t.Salary) / gEmp.Count())where gEmp.Key.Salary == avgsalselect new { gEmp.Key.Salary, gEmp.Key.Id };

    Let is a keyword used to introduce a variable in linq query