abenage
asked on
How can I store LINQ results in a session object
I have a simple LINQ query executing at page load whith which I would like to do two things.
A. Concatenate two columns with a SPACE between such as:
Select p.FirstName & " " & p.LastName as 'FullName'. I can't get this to execute with LINQ.
B. Store the returned record in a session object such as:
session("FullName") = What I just retrieved from the DB
My query executes and I do get the returned individual columns.
Any ideas?
A. Concatenate two columns with a SPACE between such as:
Select p.FirstName & " " & p.LastName as 'FullName'. I can't get this to execute with LINQ.
B. Store the returned record in a session object such as:
session("FullName") = What I just retrieved from the DB
My query executes and I do get the returned individual columns.
Any ideas?
Dim db As New VBCODE.jhadbDataClassesDataContext
Dim PersonName = From p In db.persons _
Where p.PersonID = Request("PersonID") _
Select p.FirstName, p.LastName
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your help.
Open in new window