views:

179

answers:

1

I'd like to expose a method over WCF something like GetEmployees(EmployeeColumn orderby), that returns a list of employees in an order.

I don't really want to create an enum EmployeeColumn that contains all possible column so the user can choose.

What do you suggest? I'd like to achieve this using linq-to-entities.

+3  A: 

If you want to tell the service what to order by you need to send the column to sort on either as an enum or as a string. Both would require some logic on the server side.

Is there a reason why you need to do the sorting on the server side?

If not it is very easy to sort on the client side using linq to entities.

Shiraz Bhaiji
thanks, I did think about making the client order themselves but figured that it be best to offer on the server side an order by so the client don't have to order by themself. They can get there result in a ordered way.
pdiddy