>Do you know how to adjust these two calls:
Adjust in what way ?
>
> public PagedResult<Operator> GetOperators(QueryRequest queryRequest)
> {
> return _operatorRepository.GetPagedRequest(queryRequest);
> }
>
> public IEnumerable<Operator> GetAllOperators()
> {
> return _operatorRepository.GetAll();
> }
>
>Do you know how to create a shorter object on the fly? The Operator object has lots of columns and I just want to return a few (in particular, OpCode, FirstName, LastName and Hidden)
>
I think you will need a concrete 'short form' of the Operator class (unless you want to mess with dynamics)
One solution: Create an implicit or explicit cast from 'Operator' to 'ShortOperator' then you should be able to tack '.Select((x => (ShortOperator) (x)))' onto the end of the GetAll(). If you don't want to implement the casting then use 'Select(x => new ShortOperator() {Name = x.Name})' etc.
One advantage of using a cast is that it can be used on single Operator instances as well..