Use DTOs to return API requests instead of Database Schema types.

Make use of IHttpStatusCodeResults
This commit is contained in:
2025-09-02 22:26:50 +02:00
parent 55f04710a7
commit cb14a7c31f
27 changed files with 887 additions and 467 deletions

View File

@@ -0,0 +1,17 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace API.Controllers.DTOs;
/// <summary>
/// The <see cref="API.Schema.MangaContext.Author"/> DTO
/// </summary>
public record Author(string Key, string Name) : Identifiable(Key)
{
/// <summary>
/// Name of the Author.
/// </summary>
[Required]
[Description("Name of the Author.")]
public string Name { get; init; } = Name;
}