1
Answer

Best way?

James

James

16y
3.2k
1
Firstly, im an old c programmer, so probably got some daft questions.

Have created a simple web page, with a simple gridview control on it.
I have a sql database which i have linked to using linq.
Ive created a nice pictorial view of my tables using the server explorer and this has created default classes for each table.

I can simply create my linq query, and bind it to the control, this works fine, except, i would like to push the linq code into a class firstly to tidy up my code, and secondly to reuse as its called from a few different places.

My first attempt partially succeded, shove the linq code into its own static class, it tuns, but i cant return the results of the query easily.

Whats the simplist way to do this?

Thanks,

Jim

Answers (1)