Complex objects graph
class Person : MementoEntity
{
public Person()
{
this.Addresses = new MementoEntityCollection<Address>();
}
public String FirstName
{
get { return this.GetPropertyValue(() => this.FirstName); }
set { this.SetPropertyValue(() => this.FirstName, value); }
}
public String LastName
{
get { return this.GetPropertyValue(() => this.LastName); }
set { this.SetPropertyValue(() => this.LastName, value); }
}
public IList<Address> Addresses { get; private set; }
}
class Address : MementoEntity
{
public String Street
{
get { return this.GetPropertyValue(() => this.Street); }
set { this.SetPropertyValue(() => this.Street, value); }
}
}Last updated