Linq To Sql return from function as IQueryable<T>
问题 Ok, I have managed to get the following working public IQueryable getTicketInformation(int ticketID) { var ticketDetails = from tickets in _context.tickets join file in _context.file_objects on tickets.ticket_id equals file.source_id where tickets.ticket_id == ticketID select new { tickets.ticket_id, tickets.title, tickets.care_of_email, file.filename }; return ticketDetails.AsQueryable(); } I went ahead and created my own class (myObject) containing the primitives ticket_id, title, care_of