.NET 7: Conditional Json serialization/deserialization
I'm working on a .NET 7 api and I'm having a problem regarding Id field of the DTO object. This is my UserDTO (used to return users in get as well as to post/put a user): public class UserDTO {…