database changes
This commit is contained in:
@@ -6,7 +6,4 @@ public class Genre
|
||||
{
|
||||
[JsonPropertyName("name")]
|
||||
public required string Name { get; set; }
|
||||
|
||||
[JsonPropertyName("description")]
|
||||
public string? Description { get; set; }
|
||||
}
|
||||
@@ -10,9 +10,6 @@ public class GenreQueryParameters : QueryParameters<GenreResponse>
|
||||
[FromQuery(Name = "name")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
[FromQuery(Name = "description")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -22,8 +19,6 @@ public class GenreQueryParameters : QueryParameters<GenreResponse>
|
||||
protected override bool IsMeetingConditions(GenreResponse item) =>
|
||||
(
|
||||
TestStringWithRegex(item.Name, Name)
|
||||
&&
|
||||
TestStringWithRegex(item.Description, Description)
|
||||
);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -7,13 +7,11 @@ public class GenreRequest : Genre
|
||||
public Database.Model.Common.Genre CreateGenre() => new Database.Model.Common.Genre
|
||||
{
|
||||
Name = Name,
|
||||
Description = Description,
|
||||
};
|
||||
|
||||
public void UpdateGenre(Database.Model.Common.Genre genre)
|
||||
{
|
||||
genre.Name = Name;
|
||||
genre.Description = Description;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -12,8 +12,7 @@ public class GenreResponse : Genre, IQueryOrderable<GenreResponse>
|
||||
public static IDictionary<string, Func<GenreResponse, IComparable>> OrderableProperties { get; } = new Dictionary<string, Func<GenreResponse, IComparable>>
|
||||
{
|
||||
{ "id", x => x.Id },
|
||||
{ "name", x => x.Name },
|
||||
{ "description", x => x.Description }
|
||||
{ "name", x => x.Name }
|
||||
};
|
||||
|
||||
|
||||
@@ -34,7 +33,6 @@ public class GenreResponse : Genre, IQueryOrderable<GenreResponse>
|
||||
{
|
||||
Id = genre.Id;
|
||||
Name = genre.Name;
|
||||
Description = genre.Description;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user