Skip to content

Instantly share code, notes, and snippets.

@bsommardahl
Created August 18, 2012 15:57
Show Gist options
  • Save bsommardahl/3387958 to your computer and use it in GitHub Desktop.
Save bsommardahl/3387958 to your computer and use it in GitHub Desktop.
Complete Auto-Updating CustomerAddress Entity
public class CustomerAddress
{
public event DomainEvent NotifyObservers;
string _name;
public string Name
{
get { return _name; }
set
{
_name = value;
NotifyObservers(new CustomerAddressChanged(this));
}
}
string _address;
public string Address
{
get { return _address; }
set
{
_address = value;
NotifyObservers(new CustomerAddressChanged(this));
}
}
string _city;
public string City
{
get { return _city; }
set
{
_city = value;
NotifyObservers(new CustomerAddressChanged(this));
}
}
string _state;
public string State
{
get { return _state; }
set
{
_state = value;
NotifyObservers(new CustomerAddressChanged(this));
}
}
string _zip;
public string Zip
{
get { return _zip; }
set
{
_zip = value;
NotifyObservers(new CustomerAddressChanged(this));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment