-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
34 lines (32 loc) · 1.04 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
namespace ReflectionDynamicSort
{
using Helpers;
using Enumerations;
using Models;
using System.Collections.Generic;
using System.Linq;
class Program
{
static void Main(string[] args)
{
var listEmployees = GetListEmployees();
var orderList = new List<OrderModel>()
{
new OrderModel("Age"),
new OrderModel("Department", OrderTypeEnum.Descending),
new OrderModel("Name", OrderTypeEnum.Descending)
};
var resultListOrder = listEmployees.AsQueryable().Order(orderList);
}
static List<EmployeeModel> GetListEmployees()
{
return new List<EmployeeModel>
{
new EmployeeModel(1, "David", "Software Developer", 50),
new EmployeeModel(2, "Charlotte", "Finance", 30),
new EmployeeModel(3, "Elizabeth", "Marketing", 40),
new EmployeeModel(4, "Thomas", "Office Administration", 35)
};
}
}
}