Return multiple rows using wssf

Topics: General Discussion Forum, July and December Releases Forum
May 26, 2007 at 7:01 AM
Hi, can anyone point me in te right direction?

I have found WSSF and the guidance package recipes helpful for providing out of the box WCF services that use CRUD queries against single rows in the DB.

Can anyone first:

Point me to the best way to retrieve multiple rows for binding to gridviews or dropdownlists in the client. A simple example would be great. For example, if I wanted retrieve the name and id of all the records in an SQL server table, say 50 rows and bind to a dropdownlist. I get the crud recipe to provide List<blah> in repository. Then what has to happen in the contracts and implementation etc. Nothing seems to work and its probably very easy. Is there some sort of translation required?

Second. Are there any WSSF implementation examples anywhere that operate on multiple rows etc. Everything I look up does operations on just one row at a time. If I knew how to return list<data> using the WSSF recipes the flood gates for uses would open up.

Thanks in advance.
May 29, 2007 at 10:41 AM
OK - Lets see if I can explain this and not confuse you more…..

If you have your CRUD calls setup, then when the web service calls the SP Get50Rows() it will return a Generic List on Business Entities, which basically are objects that represent a data row.

The Business Entities need to be transformed/translated into an array of Data Types, which basically are serializable objects.

This array is returned to your application and all you do is bind the array to your control.

Easy ah?
Jun 14, 2007 at 11:14 AM
i have the same question.
this array of data types how can i make it ?
in my business logic i have a managerPerson with one method named showByLastName, this method must return all person with same LastName. the repository returns me List<Person> and the logic return the same List<Person>. my DataType must contain parameters like class Person or some kind of List ? u say array but how ? all can see inside ara others DataType or primitive classes. next i suppose my message contract must contain that DataType.
Finally in my gridView how can insert that array ?