Following the advice of the answers provided, I fixed this question. The problem was the setter accessory, as well as the _VATIncusive property. By changing the code to the following, I managed to get the system to work as I expected.
However, I believe that this is not the best approach, but it works correctly ...
EDIT : EDIT . I reduced access to accessories on the advice of Ryan and hvd ..
EDIT . I am not sure that both properties are set publicly. But I do not think this will be a problem.
[Column("VATInclusive")] public int _VATInclusive { get; set; } [NotMapped] public bool VATInclusive { get { return _VATInclusive != 0; } set { _VATInclusive = value ? 1 : 0; } }
source share