mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Add JsonPropertyName attributes to DTO properties for serialization
This commit is contained in:
@@ -23,9 +23,14 @@
|
||||
// Copyright © 2003-2021 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Marechai.Data.Dtos;
|
||||
|
||||
public class BaseDto<TKey>
|
||||
{
|
||||
public TKey Id;
|
||||
[JsonPropertyName("id")]
|
||||
[Required]
|
||||
public TKey Id { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user