Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF Ria Services entities and INotifyPropertyChanged
    primarykey
    data
    text
    <p>I am having an issue where the <i>PropertyChanged</i> event from the generated Ria Services entities is not raised for all the properties.</p> <p>When I look at the generated code (client-side), I can see that my entities are deriving from the <i>Entity</i> object which implements <i>INotifyPropertyChanged</i>. I can also see that some properties, like the <i>Id</i> property, is raising the <i>PropertyChanged</i> event but some are not. </p> <p>I did not use any T4 templates so the default were used. </p> <p>So, my question is:</p> <p>Is there an option/attribute that I can set so that the <i>PropertyChanged</i> event be raised for any properties of the generated client-side entities?</p> <p>Any help would be appreciated.</p> <p>EDIT:</p> <p>Here's an example of a property, in the auto-generated <strong>client-side</strong> file, which <strong>doesn't</strong> raise the <i>PropertyChanged</i> event:</p> <pre><code> [DataMember()] [Required()] [StringLength(50)] public string FirstName { get { return this._firstName; } set { if ((this._firstName != value)) { this.OnFirstNameChanging(value); this.RaiseDataMemberChanging("FirstName"); this.ValidateProperty("FirstName", value); this._firstName = value; this.RaiseDataMemberChanged("FirstName"); this.OnFirstNameChanged(); } } } </code></pre> <p>And this is what was defined in the model <strong>server-side</strong>:</p> <pre><code> [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] [DataMemberAttribute()] public global::System.String FirstName { get { return _FirstName; } set { OnFirstNameChanging(value); ReportPropertyChanging("FirstName"); _FirstName = StructuralObject.SetValidValue(value, false); ReportPropertyChanged("FirstName"); OnFirstNameChanged(); } } </code></pre> <p>Here's an example of a property, in the auto-generated <strong>client-side</strong> file, which <strong>does</strong> raise the <i>PropertyChanged</i> event:</p> <pre><code> [DataMember()] [Editable(false, AllowInitialValue=true)] [Key()] [RoundtripOriginal()] public Guid Id { get { return this._id; } set { if ((this._id != value)) { this.OnIdChanging(value); this.ValidateProperty("Id", value); this._id = value; this.RaisePropertyChanged("Id"); this.OnIdChanged(); } } } </code></pre> <p>And this is what was defined in the model <strong>server-side</strong>:</p> <pre><code> [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] [DataMemberAttribute()] public global::System.Guid Id { get { return _Id; } set { if (_Id != value) { OnIdChanging(value); ReportPropertyChanging("Id"); _Id = StructuralObject.SetValidValue(value); ReportPropertyChanged("Id"); OnIdChanged(); } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload