From 062ee94f0c347ed959e4dfa201c686038ebbaa52 Mon Sep 17 00:00:00 2001 From: Ali Yousefi Date: Sat, 16 Dec 2023 20:26:52 +0330 Subject: [PATCH] Add support for SortColumnStrategyContract --- .../Common/SortColumnStrategyContract.cs | 19 +++++++++++++++++++ .../Requests/FilterRequestContract.cs | 10 ++++------ .../EasyMicroservices.Cores.Contracts.csproj | 1 - 3 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Common/SortColumnStrategyContract.cs diff --git a/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Common/SortColumnStrategyContract.cs b/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Common/SortColumnStrategyContract.cs new file mode 100644 index 0000000..364c1d7 --- /dev/null +++ b/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Common/SortColumnStrategyContract.cs @@ -0,0 +1,19 @@ +namespace EasyMicroservices.Cores.Contracts.Common; +/// +/// +/// +public class SortColumnStrategyContract +{ + /// + /// + /// + public string ColumnName { get; set; } + /// + /// + /// + public bool? IsDescending { get; set; } + /// + /// + /// + public int Index { get; set; } +} diff --git a/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/FilterRequestContract.cs b/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/FilterRequestContract.cs index cee3c08..f07f006 100644 --- a/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/FilterRequestContract.cs +++ b/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/FilterRequestContract.cs @@ -1,5 +1,7 @@ -using EasyMicroservices.Cores.DataTypes; +using EasyMicroservices.Cores.Contracts.Common; +using EasyMicroservices.Cores.DataTypes; using System; +using System.Collections.Generic; namespace EasyMicroservices.Cores.Contracts.Requests { @@ -57,11 +59,7 @@ public class FilterRequestContract /// /// /// - public string SortColumnNames { get; set; } - /// - /// - /// - public bool IsDescending { get; set; } + public List SortColumnNames { get; set; } /// /// text to search /// diff --git a/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj b/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj index 9525d5a..744386d 100644 --- a/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj +++ b/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj @@ -17,7 +17,6 @@ -