You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
modelBuilder.SharedTypeEntity<ProxyableSharedType>("PST", b =>{b.IndexerProperty<int>("Id").ValueGeneratedNever();b.IndexerProperty<string>("Payload");});
But it doesn't because initially "Id" is not in the dictionary, so null is returned by the indexer, but the property doesn't support nulls.
Should property getter for indexer property account for the fact that object is returned from indexer (which could be null) and convert it to appropriate CLR default?
Activity
ajcvickers commentedon Aug 26, 2020
I'm finding it hard to use property bags without this; should we pull it into 5.0?
For example, I thought this would work:
But it doesn't because initially "Id" is not in the dictionary, so null is returned by the indexer, but the property doesn't support nulls.
smitpatel commentedon Aug 26, 2020
Should property getter for indexer property account for the fact that object is returned from indexer (which could be null) and convert it to appropriate CLR default?
ajcvickers commentedon Aug 26, 2020
@smitpatel Possibly; I can look at making it act like a nulable backing field.