troubleshooting Question

WCF Rest / Linq

Avatar of Neogeta
NeogetaFlag for United Kingdom of Great Britain and Northern Ireland asked on
WCFMicrosoft Development
4 Comments1 Solution886 ViewsLast Modified:
Hello,

I'm working on a WCF Service based off the WCF Rest 4.0 template and help from you guys.
The service will be to return unmarked registers with student details and photo.

I am now stuck linq isn't quite behaving how it does within linqpad.

I have three tables; a staff table, a register table and a student table. A register can have one member of staff and more than one student. so for staffid 1 I'm expecting 5 rows.
My linqpad query returns 5 rows, my vb code returns one line, and I have no idea whats wrong

Any help would be greatly appreciated.
Thanks
David  
Public Function GetStaffRegister(ByVal id As String) As List(Of Register)
            Dim dc As New RegistersEntities3
            Dim P =
                From r In dc.Registers _
            Where r.staffid = id
            Return P.ToList
        End Function
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 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 4 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