-
Notifications
You must be signed in to change notification settings - Fork 16
3. OrderBy
IharYakimush edited this page Mar 1, 2018
·
1 revision
using System;
using System.Linq;
using Community.OData.Linq;
IQueryable<Sample> dataSet = Sample.CreateQuerable();
ample[] filterResult = dataSet.OData().OrderBy("Id desc,Name asc").ToArray();
foreach (Sample sample in filterResult)
{
Console.WriteLine("Id:{0} Name:{1}", sample.Id, sample.Name);
}
Id:3 Name:name3
Id:2 Name:name2
Id:1 Name:name1