【发布时间】:2011-08-19 10:38:20
【问题描述】:
我正在尝试设置最小起订量,但我需要创建一个假的 IQueryable。我做了一个集合,但我不知道如何将它转换为 IQueryable。
Collection<DetailDataEntity> DetailDataEntityCollection =
new Collection<DetailDataEntity>();
DetailDataEntity DetailDataEntity = new DetailDataEntity();
DetailDataEntity.FeedTypeID = 1;
DetailDataEntityCollection.Add(DetailDataEntity);
_mockRepository.Setup(x => x.GetDetail(It.IsAny<Int32>(),
It.IsAny<Enum.FeedTypeEnum.FeedType>()))
.Returns(DetailDataEntityCollection);
【问题讨论】:
标签: c# linq collections