IGroupMeta.Sort Property
.NET Standard 2.x
Gets and sets the sorting criteria for this group.
Namespace: DWNet.Data
Assembly: DWNet.Data.dll
Syntax
IExpressionable<string> Sort { get; set; }
Return
DWNet.Data.IExpressionable<string>
The sorting criteria for the group.
Examples
The following code example demonstrates how to use the Sort property.
using DWNet.Data;
using System;
namespace Appeon.ApiDoc.IGroupMetaExamples
{
public class SortExample
{
private readonly SchoolContext _context;
public SortExample(SchoolContext dataContext)
{
// Sets the data context
_context = dataContext;
}
public void Example()
{
// Instantiates datastore with datawindow: d_studentgrade_groupsort
var datastore = new DataStore("d_studentgrade_groupsort", _context);
datastore.Retrieve();
// Gets the properties for the Groups keyword.
var groupMetas = datastore.DwMeta.Groups;
Console.WriteLine("Groups Count: {0}", groupMetas.Count);
foreach (var item in groupMetas)
{
Console.WriteLine("Sort: {0}", item.Sort.Expression);
}
/*This code produces the following output:
Groups Count: 1
Sort: count(studentid for group 1) A
*/
}
}
}
Example Refer To
Model Class: D_Studentgrade_Groupsort
DataWindow File: d_studentgrade_groupsort
Applies to
.NET Standard
2.x