Open randombyte-developer opened 6 months ago
A workaround is to not enable the INotifyPropertyChanging
pattern in the EBG config.
Looks like with the INotifyPropertyChanging, also need to null out the PropertyChanged and Property Changing events:
public event System.ComponentModel.PropertyChangedEventHandler? PropertyChanged;
public event System.ComponentModel.PropertyChangingEventHandler? PropertyChanging;
@daryllabar If there's anything to test or try out, just tell me.
Tool and Version EarlyBoundGenerator V 2.2024.5.16
Describe the bug I wanted to try out https://github.com/daryllabar/DLaB.Xrm.XrmToolBoxTools/issues/311. It generates nullable types. When compiling the generated code there is a compile error:
The relevant line of code is
this.SetRelatedEntity<Contact>("account_primary_contact", null, value);
value
can be null in this case. SetRelatedEntity() does handle nullvalue
s correctly but the nullable entity type has to be used like this:this.SetRelatedEntity<Contact?>("account_primary_contact", null, value);
To Reproduce Steps to reproduce the behavior:
Expected behavior No errors.
Additional context My C# project file looks like this: