I think I found something... there's an exception returned from the webapi "get" call.
It would seem that there are differences in the linq aupport between Entity Framework and using linq to sql directly, as the sample you provided does. Since "OrderBy" isn't called if the incoming query doesn't ask for it, the call to "skip" fails.
I've worked around it (for now) by setting a default "order by" if the query isn't asking for one. Is there a way at the view level to set the default sort order for a grid, so I don't have to make that assumption in the webapi code?
Exception thrown: 'System.NotSupportedException' in EntityFramework.dll ("The method 'Skip' is only supported for sorted input in LINQ to Entities. The method 'OrderBy' must be called before the method 'Skip'.")
>
EntityFramework.dll!PassthroughOrderByLifter.Skip(System.Data.Entity.Core.Common.CommandTrees.DbExpression
k = {unknown}) C#
EntityFramework.dll!OrderByLifter.Skip(System.Data.Entity.Core.Common.CommandTrees.DbExpressionBinding
input = {unknown},
System.Data.Entity.Core.Common.CommandTrees.DbExpression skipCount =
{unknown}) C#
EntityFramework.dll!System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.Skip(System.Data.Entity.Core.Common.CommandTrees.DbExpressionBinding
input = {unknown},
System.Data.Entity.Core.Common.CommandTrees.DbExpression skipCount =
{unknown}) C#
EntityFramework.dll!SkipTranslator.TranslatePagingOperator(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter
parent = {unknown},
System.Data.Entity.Core.Common.CommandTrees.DbExpression operand =
{unknown}, System.Data.Entity.Core.Common.CommandTrees.DbExpression
count = {unknown}) C#
EntityFramework.dll!PagingTranslator.TranslateUnary(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter
parent = {unknown},
System.Data.Entity.Core.Common.CommandTrees.DbExpression operand =
{unknown}, System.Linq.Expressions.MethodCallExpression call =
{unknown}) C#
EntityFramework.dll!UnarySequenceMethodTranslator.Translate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter
parent = {unknown}, System.Linq.Expressions.MethodCallExpression call =
{unknown}) C#
EntityFramework.dll!SequenceMethodTranslator.Translate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter
parent = {unknown}, System.Linq.Expressions.MethodCallExpression call =
{unknown}, System.Data.Entity.Core.Objects.ELinq.SequenceMethod
sequenceMethod = {unknown}) C#
EntityFramework.dll!MethodCallTranslator.TypedTranslate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter
parent = {unknown}, System.Linq.Expressions.MethodCallExpression linq =
{unknown}) C#
EntityFramework.dll!TypedTranslator`1.Translate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter
parent = {unknown}, System.Linq.Expressions.Expression linq =
{unknown}) C#
EntityFramework.dll!System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.TranslateExpression(System.Linq.Expressions.Expression
linq = {unknown}) C#
EntityFramework.dll!UnarySequenceMethodTranslator.Translate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter
parent = {unknown}, System.Linq.Expressions.MethodCallExpression call =
{unknown}) C#
EntityFramework.dll!SequenceMethodTranslator.Translate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter
parent = {unknown}, System.Linq.Expressions.MethodCallExpression call =
{unknown}, System.Data.Entity.Core.Objects.ELinq.SequenceMethod
sequenceMethod = {unknown}) C#
EntityFramework.dll!MethodCallTranslator.TypedTranslate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter
parent = {unknown}, System.Linq.Expressions.MethodCallExpression linq =
{unknown}) C#
EntityFramework.dll!TypedTranslator`1.Translate(System.Data.Entity.Core.Objects.ELinq.ExpressionConverter
parent = {unknown}, System.Linq.Expressions.Expression linq =
{unknown}) C#
EntityFramework.dll!System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.TranslateExpression(System.Linq.Expressions.Expression
linq = {unknown}) C#
EntityFramework.dll!System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.Convert() C#
EntityFramework.dll!System.Data.Entity.Core.Objects.ELinq.ELinqQueryState.GetExecutionPlan(System.String
(error) = Internal Error in IntelliTrace) C#
EntityFramework.dll!<>c__DisplayClass7.AnonymousMethod() C#
EntityFramework.dll!System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction(System.Func
func = {unknown},
System.Data.Entity.Infrastructure.IDbExecutionStrategy executionStrategy
= {unknown}, bool startLocalTransaction = {unknown}, bool
releaseConnectionOnSuccess = {unknown}) C#
EntityFramework.dll!<>c__DisplayClass7.AnonymousMethod() C#
EntityFramework.SqlServer.dll!System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(System.Func
operation = {unknown}) C#
EntityFramework.dll!System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(System.String
(error) = Internal Error in IntelliTrace) C#
EntityFramework.dll!System.Data.Entity.Core.Objects.ObjectQuery`1.AnonymousMethod() C#
EntityFramework.dll!System.Data.Entity.Internal.LazyEnumerator`1.MoveNext() C#
Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(Newtonsoft.Json.JsonWriter
writer = {unknown}, System.Collections.IEnumerable values = {unknown},
Newtonsoft.Json.Serialization.JsonArrayContract contract = {unknown},
Newtonsoft.Json.Serialization.JsonProperty member = {unknown},
Newtonsoft.Json.Serialization.JsonContainerContract collectionContract =
{unknown}, Newtonsoft.Json.Serialization.JsonProperty containerProperty
= {unknown}) C#
Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(Newtonsoft.Json.JsonWriter
writer = {unknown}, object value = {unknown},
Newtonsoft.Json.Serialization.JsonContract valueContract = {unknown},
Newtonsoft.Json.Serialization.JsonProperty member = {unknown},
Newtonsoft.Json.Serialization.JsonContainerContract containerContract =
{unknown}, Newtonsoft.Json.Serialization.JsonProperty containerProperty =
{unknown}) C#
Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(Newtonsoft.Json.JsonWriter
writer = {unknown}, object value = {unknown},
Newtonsoft.Json.Serialization.JsonObjectContract contract = {unknown},
Newtonsoft.Json.Serialization.JsonProperty member = {unknown},
Newtonsoft.Json.Serialization.JsonContainerContract collectionContract =
{unknown}, Newtonsoft.Json.Serialization.JsonProperty containerProperty
= {unknown}) C#
Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(Newtonsoft.Json.JsonWriter
writer = {unknown}, object value = {unknown},
Newtonsoft.Json.Serialization.JsonContract valueContract = {unknown},
Newtonsoft.Json.Serialization.JsonProperty member = {unknown},
Newtonsoft.Json.Serialization.JsonContainerContract containerContract =
{unknown}, Newtonsoft.Json.Serialization.JsonProperty containerProperty =
{unknown}) C#
Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(Newtonsoft.Json.JsonWriter
jsonWriter = {unknown}, object value = {unknown}, System.Type
objectType = {unknown}) C#
Newtonsoft.Json.dll!Newtonsoft.Json.JsonSerializer.SerializeInternal(Newtonsoft.Json.JsonWriter
jsonWriter = {unknown}, object value = {unknown}, System.Type
objectType = {unknown}) C#
System.Net.Http.Formatting.dll!System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStream(System.Type
type = {unknown}, object value = {unknown}, System.IO.Stream
writeStream = {unknown}, System.Text.Encoding effectiveEncoding =
{unknown}) C#
System.Net.Http.Formatting.dll!System.Net.Http.Formatting.JsonMediaTypeFormatter.WriteToStream(System.Type
type = {unknown}, object value = {unknown}, System.IO.Stream
writeStream = {unknown}, System.Text.Encoding effectiveEncoding =
{unknown}) C#
System.Net.Http.Formatting.dll!System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStream(System.Type
type = {unknown}, object value = {unknown}, System.IO.Stream
writeStream = {unknown}, System.Net.Http.HttpContent content =
{unknown}) C#
System.Net.Http.Formatting.dll!System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStreamAsync(System.Type
type = {unknown}, object value = {unknown}, System.IO.Stream
writeStream = {unknown}, System.Net.Http.HttpContent content =
{unknown}, System.Net.TransportContext transportContext = {unknown},
System.Threading.CancellationToken cancellationToken = {unknown}) C#
System.Net.Http.Formatting.dll!System.Net.Http.Formatting.JsonMediaTypeFormatter.WriteToStreamAsync(System.Type
type = {unknown}, object value = {unknown}, System.IO.Stream
writeStream = {unknown}, System.Net.Http.HttpContent content =
{unknown}, System.Net.TransportContext transportContext = {unknown},
System.Threading.CancellationToken cancellationToken = {unknown}) C#
System.Net.Http.Formatting.dll!System.Net.Http.Formatting.MediaTypeFormatter.WriteToStreamAsync(System.Type
type = {unknown}, object value = {unknown}, System.IO.Stream
writeStream = {unknown}, System.Net.Http.HttpContent content =
{unknown}, System.Net.TransportContext transportContext = {unknown})
C#
System.Net.Http.Formatting.dll!System.Net.Http.ObjectContent.SerializeToStreamAsync(System.IO.Stream
stream = {unknown}, System.Net.TransportContext context = {unknown})
C#
System.Net.Http.dll!System.Net.Http.HttpContent.CopyToAsync(System.IO.Stream
stream = {unknown}, System.Net.TransportContext context = {unknown})
C#
System.Web.Http.WebHost.dll!<WriteBufferedResponseContentAsync>d__1b.MoveNext() C#
mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start(TStateMachine stateMachine = {unknown}) C#
System.Web.Http.WebHost.dll!System.Web.Http.WebHost.HttpControllerHandler.WriteBufferedResponseContentAsync(System.Web.HttpContextBase
httpContextBase = {unknown}, System.Net.Http.HttpRequestMessage request
= {unknown}, System.Net.Http.HttpResponseMessage response = {unknown},
System.Web.Http.ExceptionHandling.IExceptionLogger exceptionLogger =
{unknown}, System.Web.Http.ExceptionHandling.IExceptionHandler
exceptionHandler = {unknown}, System.Threading.CancellationToken
cancellationToken = {unknown}) C#
System.Web.Http.WebHost.dll!System.Web.Http.WebHost.HttpControllerHandler.WriteResponseContentAsync(System.Web.HttpContextBase
httpContextBase = {unknown}, System.Net.Http.HttpRequestMessage request
= {unknown}, System.Net.Http.HttpResponseMessage response = {unknown},
System.Web.Http.ExceptionHandling.IExceptionLogger exceptionLogger =
{unknown}, System.Web.Http.ExceptionHandling.IExceptionHandler
exceptionHandler = {unknown}, System.Threading.CancellationToken
cancellationToken = {unknown}) C#
System.Web.Http.WebHost.dll!<CopyResponseAsync>d__7.MoveNext() C#
mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start(TStateMachine stateMachine = {unknown}) C#
System.Web.Http.WebHost.dll!System.Web.Http.WebHost.HttpControllerHandler.CopyResponseAsync(System.Web.HttpContextBase
httpContextBase = {unknown}, System.Net.Http.HttpRequestMessage request
= {unknown}, System.Net.Http.HttpResponseMessage response = {unknown},
System.Web.Http.ExceptionHandling.IExceptionLogger exceptionLogger =
{unknown}, System.Web.Http.ExceptionHandling.IExceptionHandler
exceptionHandler = {unknown}, System.Threading.CancellationToken
cancellationToken = {unknown}) C#
System.Web.Http.WebHost.dll!<ProcessRequestAsyncCore>d__0.MoveNext() C#
mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start(TStateMachine stateMachine = {unknown}) C#
System.Web.Http.WebHost.dll!System.Web.Http.WebHost.HttpControllerHandler.ProcessRequestAsyncCore(System.Web.HttpContextBase
contextBase = {unknown}) C#
System.Web.Http.WebHost.dll!System.Web.Http.WebHost.HttpControllerHandler.ProcessRequestAsync(System.Web.HttpContext
context = {unknown}) C#
System.Web.dll!<>c__DisplayClass4_0.AnonymousMethod() C#
System.Web.dll!System.Web.TaskAsyncHelper.BeginTask(System.Func<System.Threading.Tasks.Task>
taskFunc = {unknown}, System.AsyncCallback callback = {unknown}, object
state = {unknown}) C#
System.Web.dll!System.Web.HttpTaskAsyncHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext
context = {unknown}, System.AsyncCallback cb = {unknown}, object
extraData = {unknown}) C#
System.Web.dll!CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() C#
System.Web.dll!System.Web.HttpApplication.ExecuteStep(IExecutionStep
step = {unknown}, ref bool completedSynchronously = {unknown}) C#
System.Web.dll!PipelineStepManager.ResumeSteps(System.Exception error = {unknown}) C#
System.Web.dll!System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext
context = {unknown}, System.AsyncCallback cb = {unknown}) C#