I have this method that returns a Linq-to-SQL query for all rows in a UserStatus table:
public IQueryable<BLL.Entity.UserStatus> GetAll() { var query = from e in _SelectDataContext.UserStatus select new BLL.Entity.UserStatus { UserStatusId = e.UserStatusId, Enum = e.Enum, Name = e.Name }; return query; }
This is just a lookup table that is unlikely to ever change, so I would like to cache the results. I can convert it to List<> and cache, but I would prefer to return an IQueryable object, since the other methods in the class depend on this. Can anyone help? Thanks.
source share