Beispiel #1
0
        private static DbRawSqlQuery CreateDbRawSqlQuery(IEnumerable <object> sourceEnumerable)
        {
            var internalSqlNonSetQueryMock = MockHelper.CreateMockInternalSqlNonSetQuery("");
            var shimEnumerator             = new DbEnumeratorShim <object>(sourceEnumerable.GetEnumerator());

#if !NET40
            internalSqlNonSetQueryMock.Setup(m => m.GetAsyncEnumerator()).Returns(shimEnumerator);
#endif
            internalSqlNonSetQueryMock.Setup(m => m.GetEnumerator()).Returns(shimEnumerator);
            return(new DbRawSqlQuery(internalSqlNonSetQueryMock.Object));
        }