When creating a DomainService, within .NET Ria Services and using Subsonic I can add a IQueryable method as follows:
public IQueryable<Server> GetServers() { return Server.All(); }
It compiles with no problem but when I add a method to get a specific server:
public IQueryable<Server> GetServer(int serverID) { return Server.SingleOrDefault( srv => srv.server_id == serverID); }
I get a "cannot implicitly convert type myApp.Data.Server to System.Linq.IQueryable.."
I've tried to append AsQueryable() to the end but that doesn't seem to work as myApp.Data.Server doesn't have that definition.
I'm at a loss of how to convert this to IQueryable, if it can.