Implement INotifyPropertyChanged on data types
See original GitHub issueThe types generated are not implementing INotifyPropertyChanged. Example on .net:
public partial class MyEntity : ... System.ComponentModel.INotifyPropertyChanged {
...
[System.Runtime.Serialization.DataMemberAttribute()]
public bool MyProperty {
get {
return this.MyPropertyField;
}
set {
if ((this.MyPropertyField.Equals(value) != true)) {
this.MyPropertyField = value;
this.RaisePropertyChanged("MyPropertyField");
}
}
}
...
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
protected void RaisePropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
if ((propertyChanged != null)) {
propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
Currently this is generated in a netstandard2.0 project:
public partial class MyEntity
{
...
[System.Runtime.Serialization.DataMemberAttribute()]
public bool MyProperty
{
get
{
return this.MyPropertyField;
}
set
{
this.MyPropertyField= value;
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
INotifyPropertyChanged Interface (System.ComponentModel)
Notifies clients that a property value has changed. ... the Person type implements the INotifyPropertyChanged interface and raises a PropertyChanged event ...
Read more >In MVVM model should the model implement ...
Implementing INotifyPropertyChanged in Models is totally acceptable -. Typically, the model implements the facilities that make it easy to ...
Read more >Data Binding With INotifyPropertyChanged Interface
The object must fire the “PropertyChanged” event whenever the value of one of its public properties changes. So, first of all we'd like...
Read more >Type-Safe Two-Way Data Binding with INotifyPropertyChanged
The reason for this is that Person needs to inform the binding that the Age property has changed so that it can get...
Read more >A base class which implements INotifyPropertyChanged
I created an abstract class called BindableObject which implements INotifyPropertyChanged and provides all the goodies promised above. At the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Closing since this is supported by dotnet-svcutil. This doesn’t seem like a very common scenario so I don’t think we need to add this to the WCF Web Service Reference Provider UI.
If there’s a reason you need to use the UI instead of dotnet-svcutil you can get it to generate with this by adding the service reference normally, modifying the the ConnectedService.json file to add the option, then updating the service reference. The line you need to add to the json file is:
“enableDataBinding”: true,
Please add an ‘Implement INotifyPropertyChanged’ checkbox in the UI. INotifyPropertyChanged isn’t only for data binding.
A UI option will help people who are porting applications to .NET Core.