When I inspect my object in the debugger, it has 3 different entries for the property VgnItm
.
How does an object get multiple of a property?
Here is the class with multiple of VgnItm
property:
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Nest;
using Newtonsoft.Json;
namespace Vepo.Domain
{
[Serializable]
public class VgnItmEstDto : CreatedBySomeoneDto
{
[Required]
public int VgnItmId { get; set; }
public int? EstId { get; set; }
[Required]
public int NotInEstCount { get; set; } = 0;
[Required]
public int InEstCount { get; set; } = 0;
public double? Price { get; set; }
[Object]
public EstDto Est { get; set; }
public VgnItmDto VgnItm { get; set; }
public string Discriminator { get; set; }
}
public class VgnItmEstDto<TVgnItmDto> : VgnItmEstDto
where TVgnItmDto : VgnItmDto
{
public new TVgnItmDto VgnItm { get; set; }
}
}