From 02e4fb55b4a82de4bcca1cca3ba8988137200e2a Mon Sep 17 00:00:00 2001 From: Biarity Date: Tue, 26 Jun 2018 14:59:33 +1000 Subject: [PATCH] Model data contract --- Sieve/Models/SieveModel.cs | 8 ++++++-- Sieve/Sieve.csproj | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Sieve/Models/SieveModel.cs b/Sieve/Models/SieveModel.cs index 9e013d1..9483d45 100644 --- a/Sieve/Models/SieveModel.cs +++ b/Sieve/Models/SieveModel.cs @@ -1,18 +1,22 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; namespace Sieve.Models { + [DataContract] public class SieveModel : ISieveModel { + [DataMember] public string Filters { get; set; } + [DataMember] public string Sorts { get; set; } - [Range(1, int.MaxValue)] + [DataMember, Range(1, int.MaxValue)] public int? Page { get; set; } - [Range(1, int.MaxValue)] + [DataMember, Range(1, int.MaxValue)] public int? PageSize { get; set; } public List FiltersParsed diff --git a/Sieve/Sieve.csproj b/Sieve/Sieve.csproj index fc4601e..a2b336c 100644 --- a/Sieve/Sieve.csproj +++ b/Sieve/Sieve.csproj @@ -2,7 +2,7 @@ netstandard2.0 - 2.1.2 + 2.1.3 Sieve is a simple, clean, and extensible framework for .NET Core that adds sorting, filtering, and pagination functionality out of the box. Most common use case would be for serving ASP.NET Core GET queries. Documentation available on GitHub: https://github.com/Biarity/Sieve/ Copyright 2018 @@ -10,7 +10,7 @@ https://github.com/Biarity/Sieve https://emojipedia-us.s3.amazonaws.com/thumbs/240/twitter/120/alembic_2697.png - Fix issue #28 + Fix issue #30 true true Biarity