How can I implement GetItemFromCacheById function, such that it takes object from linq-to-sql cache, instead of calling the database.
using (var cxt = new DbDataContext())
{
// Read item into the cache
Item item = cxt.Items.Where(x => x.Id == 1).Single();
//...
item = GetItemFromCacheById(cxt, 1);
}