S
Steven Wolf
Hi guys,
maybe you can help me again in developing my bussiness project for a
company..
i make sure, that each property of an entity, mark it self dirty when
data get changed.. thats the code:
private Address address;
....
/// <summary>
/// Set or return an address object
/// </summary>
class Facility : EntityObject
{
[EntityMemberAttribute]
public Address Address
{
get { return this.address; }
set { base.MarkDirty(); this.address = value; }
}
In this case, the address object i return here, has his own members,
like: Street, Zip, City..
So, i can access them easily by: someFacility.Address.City;
the problem comes, when i try to change the city, for example:
someFacility.Address.City = "New York";
the facility class does'nt get dirty, because the someFacility.Address
property use the get accessor in order to return the address, and the
address itself use finaly the set-accessor..
is there any possibility to fix that problem, instead creating a new
address object and put that on the facility? (someFacility.Address =
new Address(... )
steven.
maybe you can help me again in developing my bussiness project for a
company..
i make sure, that each property of an entity, mark it self dirty when
data get changed.. thats the code:
private Address address;
....
/// <summary>
/// Set or return an address object
/// </summary>
class Facility : EntityObject
{
[EntityMemberAttribute]
public Address Address
{
get { return this.address; }
set { base.MarkDirty(); this.address = value; }
}
In this case, the address object i return here, has his own members,
like: Street, Zip, City..
So, i can access them easily by: someFacility.Address.City;
the problem comes, when i try to change the city, for example:
someFacility.Address.City = "New York";
the facility class does'nt get dirty, because the someFacility.Address
property use the get accessor in order to return the address, and the
address itself use finaly the set-accessor..
is there any possibility to fix that problem, instead creating a new
address object and put that on the facility? (someFacility.Address =
new Address(... )
steven.