Fix: Rename Generic.CL folder to flat structure, update csproj and references

This commit is contained in:
2026-08-07 02:39:46 +03:00
commit 3650c36a23
59 changed files with 2516 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
using System.Collections.Generic;
namespace Generic.Contracts.Generics;
public class ComplexSortModel
{
public IEnumerable<SortModel> Sorts { get; set; } = new List<SortModel>();
}
+25
View File
@@ -0,0 +1,25 @@
using System.Text.Json.Serialization;
namespace Generic.Contracts.Generics
{
public class Pagination
{
public int? PageSize { get; set; }
public int? CurrentPage { get; set; }
[JsonIgnore]
public int? ItemsCount { get; set; } = 0;
[JsonIgnore]
public int? TotalPages
{
get
{
if (ItemsCount == null || ItemsCount == 0) return 0;
if (PageSize == null || PageSize == 0) return 1;
return (int)Math.Ceiling((decimal)ItemsCount / (decimal)PageSize.Value);
}
}
}
}
+8
View File
@@ -0,0 +1,8 @@
namespace Generic.Contracts.Generics;
public enum SortDir
{
Ascending,
Descending,
}
+14
View File
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Generic.Contracts.Generics;
public class SortModel
{
public string SortBy { get; set; }
public SortDir SortDirection { get; set; } = SortDir.Ascending;
}