- First you need a class
- Make the property virtual
- Create a new type that inherits from your base type
- Create a property
- Set the attribute
- Be happy ;D
In this sample I added a JsonIgnore attribute to my property
Base class:
public class Teste
{
public virtual DateTime Nascimento { get; set; }
public decimal Valor { get; set; }
}
Result after IL Weaving:
public class TesteProxy : Teste
{
[JsonIgnore]
public virtual DateTime Nascimento { get; set; }
}
```