I m accessing a data context object that is auto-generated by using LINQ to SQL. The SQL database is a SQL Server 2000 box. The class I m working with is a SQL View. I have a statement that is similar to this:
query = _context.OrderDetails
.Where(w => w.Product == "TEST")
.OrderBy(o => o.DateCompleted)
.ThenBy(t => t.LineItemId)
.Skip(startRowIndex)
.Take(maximumRows);
However, when the value of Skip is anything but 0, I get this error:
This provider supports Skip() only over ordered queries returning entities or projections that contain all identity columns, where the query is a single-table (non-join) query, or is a Distinct, Except, Intersect, or Union (not Concat) operation.
I d think that between teh DateCompleted and LineItemId that the rows would be unique, but then again this pops up. Does it have to do with this being a view? If so, how can I circumvent this issue?