troubleshooting Question

How can I store LINQ results in a session object

Avatar of abenage
abenage asked on
.NET ProgrammingASP.NET
2 Comments1 Solution824 ViewsLast Modified:
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?
Dim db As New VBCODE.jhadbDataClassesDataContext
        Dim PersonName = From p In db.persons _
                         Where p.PersonID = Request("PersonID") _
                         Select p.FirstName, p.LastName
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros