albanian-xrm / albanian-xrm/Xrm-Entity-Serializer
'System.InvalidCastException' with integers
- Vorherrschende Sprache
- C#
- Sterne
- 13
- Forks
- 5
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Parts of my early-bound model have nullable `int`s. From the auto-generated Entities.cs class:
```
[System.Runtime.Serialization.DataContractAttribute()]
[Microsoft.Xrm.Sdk.Client.EntityLogicalNameAttribute("psa_psasettings")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "8.0.1.7297")]
public partial class psa_psasettings : Microsoft.Xrm.Sdk.Entity, System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
{
...
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("psa_updatenumber")]
public System.Nullable psa_UpdateNumber
{
get
{
return this.GetAttributeValue>("psa_updatenumber");
}
set
{
this.OnPropertyChanging("psa_UpdateNumber");
this.SetAttributeValue("psa_updatenumber", value);
this.OnPropertyChanged("psa_UpdateNumber");
}
}
```
In the exported JSON backup of this entity, this is represented as:

When I load the JSON file, this attribute has a `'System.InvalidCastException'`:

This happens for every `int` in this model.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.