from emp in EmployeeInfo
let years = EntityFunctions.DiffYears(emp.Birthday.Value,DateTime.Now)
let birthdayThisYear = EntityFunctions.AddYears(emp.Birthday.Value,years)
select new
{
Age = birthdayThisYear > DateTime.Now ? years - : years
}
from emp in EmployeeInfo
let years = EntityFunctions.DiffYears(emp.Birthday.Value,DateTime.Now)
let birthdayThisYear = EntityFunctions.AddYears(emp.Birthday.Value,years)
select new
{
Age = birthdayThisYear > DateTime.Now ? years - : years
}