- FIlippo Donà
- SnapDevelop
- Wednesday, 22 March 2023 11:12 AM UTC
Hello, I need information about converting datawindows to C# Model.
In SnapDevelop starting from a datawindow created with PowerBuilder I am able to create the relative C# Model using the "Convert DataWindow to C# Model" function however I find what I think is an issue.
Once the C# Model was generated and compiled, I noticed the following warnings regarding two non-nullable properties:
1> ------ Build started: Project: api.csproj, Configuration: Debug Any CPU ------
1> D_Righe_Documento.cs(22,23): Warning CS8618: L'elemento proprietà 'Descrizione' non nullable deve contenere un valore non Null all'uscita dal costruttore. Provare a dichiarare proprietà come nullable.
1> D_Righe_Documento.cs(35,23): Warning CS8618: L'elemento proprietà 'Totale_Riga' non nullable deve contenere un valore non Null all'uscita dal costruttore. Provare a dichiarare proprietà come nullable.
So I opened the settings of the DataWindow converter and I saw that the "Generate models with nullable property types" check was missing.
I checked the "Generate models with nullable property types" flag and tried to open the Preview of the C# Model I noticed that the preview is different from the code that was generated
Preview:
C# Model generated:
Any suggestions?
Environment:
SnapDevelop 2022
Thank you all
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.