.net - Linq to SQL with UDF - paging exception -
good day. got table result udf in ms sql 2008r2 base , mapped class "applicationgroupsresult"
alter function [dbo].[netsqlazman_applicationgroups] () returns table return select dbo.[netsqlazman_applicationgroupstable].* dbo.[netsqlazman_applicationgroupstable] inner join dbo.[netsqlazman_applications]() applications on dbo.[netsqlazman_applicationgroupstable].applicationid = applications.applicationid [function(name="dbo.netsqlazman_applicationgroups", iscomposable=true)] public iqueryable<applicationgroupsresult> applicationgroups() { return base.createmethodcallquery<applicationgroupsresult>(this, (methodinfo) methodbase.getcurrentmethod(), new object[0]); }
now want take few records:
var query = context.applicationgroups(); totalrecordscount = query.count(); query = string.isnullorwhitespace(sortby) ? query.orderby(x => x.applicationgroupid) : query.orderby(sortby); return query .skip(pagenumber*queryrecordscount) .take(queryrecordscount) .toarray();
and got exception: "this provider supports skip on ordered queries returning entities or projections contain identity columns, query single-table (non-join) query, or distinct, except, intersect, or union (not concat) operation."
does linqtosql udf supports paging? if wrong?
here's problem: "where query single-table (non-join) query".
the query in udf inner join
table. in order skip
work, there must pretty "stable" result set ensure can accurately select chunks of , not pull random data every time.
by way, udf example purposes? it's looks can expressed in linq in typed manner, have wonder why want use udf?
Comments
Post a Comment