Performing multiple operations if condition is satisfied in ternary operator in linq
- by user1575914
I am a beginner in LINQ.I want to perform some conditional operation lik follows,
(from emp in Employees
let DOB=emp.BirthDate.GetValueOrDefault()
let year=DOB.Year
let month=DOB.Month
let EmpAgeInYearsToday=DateTime.Now.Year-year
let EmpAgeInMonthToday=DateTime.Now.Month-month
let temp_year=(EmpAgeInYearsToday-1)
let…