我有以下查詢,Linq中給出具體的名字列
var employees = from emp in this.DataWorkspace.v2oneboxData.me_employees
where emp.me_is_deleted.Value == false && emp.me_is_manager == true
select new{emp.me_first_name,emp.me_last_name,emp.me_pkey};
我想給一個特定的名稱,以emp.me_first_name列,就像我們在SQL查詢像做:
select emp_first_Name as "First Name" from me_employees
如何在linq查詢中做到這一點???
也可以在Linq的select查詢中結合firstName和lastname嗎?就像我們在SQL查詢中所做的那樣:
select me_first_name + ' ' + me_last_name as 'Full Name' from me_employee
我該如何在linq中實現這個任務?
感謝