Conversation
|
I am missing something, void Main()
{
Order order = new Order { Id = 123 };
var trackable = order.AsTrackable();
Console.WriteLine(order.ToString());
trackable.Id = 321;
Console.WriteLine(order.ToString());
}
public class Order
{
public virtual int Id { get; set; }
public override string ToString() => $"Id={Id}";
}puts out If you can please clarify. |
I will check this and will add a Unit Test for this case. |
|
I was able to elicit the behavior. It is because of the "override" of ToString which causes this behavior. (This also happened before my change.) |
|
please provide me with an example of what happens and what you expect to happen. |
What does this change:
I need the function to pass through certain methods to the orginal target (like the funtion ToString or Equals).
Now you can add or remove method names which should be ignored.
ChangeTrackingFactory.Default.MethodsToSkip.Remove(nameof(Equals));