I need vb.net syntax of below answer(given in c#)-
How can I convert Linq results to DTO class object without iteration
I have tried converting to vb.net at this link, but it does give compilation errors.
Following is the output from above convertor -
Public Function [Get]() As List(Of User)
Using db = New MyContext()
Return (From u In db.UsersOrder By u.FirstNameNew User() With { _
Key .Id = u.pkUser, _
Key .Username = u.Username, _
Key .Password = u.Password, _
Key .Active = u.Active _
}).ToList()
End Using
End Function