Files
WatchIt/WatchIt.Common/WatchIt.Common.Model/Genres/GenreQueryParameters.cs

30 lines
634 B
C#
Raw Normal View History

2024-04-27 22:36:16 +02:00
using Microsoft.AspNetCore.Mvc;
2024-07-03 22:18:32 +02:00
using WatchIt.Common.Query;
2024-04-27 22:36:16 +02:00
namespace WatchIt.Common.Model.Genres;
public class GenreQueryParameters : QueryParameters<GenreResponse>
{
#region PROPERTIES
[FromQuery(Name = "name")]
public string? Name { get; set; }
[FromQuery(Name = "description")]
public string? Description { get; set; }
#endregion
#region PUBLIC METHODS
public override bool IsMeetingConditions(GenreResponse item) =>
(
2024-09-29 23:00:32 +02:00
TestStringWithRegex(item.Name, Name)
2024-04-27 22:36:16 +02:00
&&
2024-09-29 23:00:32 +02:00
TestStringWithRegex(item.Description, Description)
2024-04-27 22:36:16 +02:00
);
#endregion
}