hi,
i have a one to one association between user and userinfo classes. user has the light info needed all time like name id etc and userinfo has the heavy load with all detail including adresses telephones notes and so on.
so i want to make the userinfo property delayed in user class to gain performance.
delayed loading mentioned like this in documentation
[Delayed] public Byte[ BigPicture {
get { return GetDelayedPropertyValue<Byte[>("BigPicture"); }
set { SetDelayedPropertyValue<Byte[>("BigPicture", value); }
}
and i'm defining the associated property like this,
private UserInfo _UserInfo;
[Aggregated, Association("User-UserInfo")]
[Indexed(Unique = true)]
public UserInfo UserInfo
{
get
{
return _UserInfo;
}
set
{
if (_UserInfo == value)
return;
UserInfo prev_UserInfo = _UserInfo;
_UserInfo = value;
if (IsLoading) return;
if (prev_UserInfo != null && prev_UserInfo.User == this)
prev_UserInfo.User = null;
if (_UserInfo != null)
_UserInfo.User = this;
OnChanged("UserInfo");
}
}
how do i make it delayed??
Thanks.