none
How to use alias name for a column in linq using vb.net? RRS feed

  • Question

  • How to use alias name for a column in linq using vb.net?

    Dim d = From Leave In db.trn_Leave_Request Join Emp In db.mst_Employee On Emp.EmplCode Equals Leave.Emp_Code
                            Join Leavetype In db.mst_LeaveType On Leavetype.Id Equals Leave.Leave_Id Order By Leave.Leave_App_Date
                    Select New With
                    {
                     Leave.Id,
                    Leave.Leave_Month,
                     Leave.Leave_App_Date,
                    Leave.Leave_From_Date, Leave.Leave_To_Date, Emp.EmplName, Leavetype.LeaveDesc, Leave.Leave_Day
                    }

    • Moved by Naomi N Tuesday, December 18, 2012 2:07 PM Better answer can be here (From:Transact-SQL)
    Tuesday, December 18, 2012 10:52 AM

Answers

  • Search on the web and you will get loads of posts dealing with LINQ and aliasing. Here is one such LINQ or you can ask the same question on a LINQ forum.

    LINQ and aliasing


    Krishnakumar S

    • Proposed as answer by Naomi N Tuesday, December 18, 2012 2:06 PM
    • Marked as answer by Alexander Sun Wednesday, December 26, 2012 2:58 AM
    Tuesday, December 18, 2012 11:52 AM

All replies