private static INakedObjectAdapter AdaptResult(INakedObjectManager nakedObjectManager, object result) { if (CollectionUtils.IsCollection(result.GetType()) || CollectionUtils.IsQueryable(result.GetType())) { return(nakedObjectManager.CreateAdapter(result, null, null)); } return(nakedObjectManager.CreateAdapterForExistingObject(result)); }