0
我有相關的屬性問題組成attribut和RIA.I使用POCO和silverlight。這裏是我的MODELE:組成和RIA
[MetadataTypeAttribute(typeof(ModeleEnvoiEaMetaData))]
[Serializable]
public abstract partial class ModeleEnvoiEa
{
[DataMember]
public virtual int IdModeleEnvoiEa {get;set;}
[DataMember]
public virtual string Libelle {get;set;}
[DataMember]
public virtual Nullable<int> IdModeleEnvoiEaFooter {...//FK }
public virtual ModeleEnvoiEaHeaderFooter ModeleEnvoiEaFooter
{
get { return _modeleEnvoiEaFooter; }
set
{
if (!ReferenceEquals(_modeleEnvoiEaFooter, value))
{
var previousValue = _modeleEnvoiEaFooter;
_modeleEnvoiEaFooter = value;
FixupModeleEnvoiEaFooter(previousValue);
}
}
}
private ModeleEnvoiEaHeaderFooter _modeleEnvoiEaFooter;
}
public partial class ModeleEnvoiEaMetaData
{
//...
[Association("ModeleEnvoiEa_ModeleEnvoiEaFooter","IdModeleEnvoiEaFooter","IdModeleEnvoiEaHeaderFooter")]
[Include]
[Composition]
public ModeleEnvoiEaHeaderFooter ModeleEnvoiEaFooter;
}
}
在客戶端我叫測試酒莊服務方法,在客戶端的性能ModeleEnvoiEaFooter不爲空,但在我DomainServices類此屬性爲null。即使使用de Composition attribut也是如此。我如何將ModeleEnvoiEaFooter屬性的值發送到Domainservices類?
[Invoke]
public ModeleEnvoiEa Test(ModeleEnvoiEa modele)
{
// modele.IdModeleEnvoiEaFooter == 1 // FK to ModeleEnvoiEaFooter
// modele.ModeleEnvoiEaFooter is null here ! Why ? an how can i send this object
}
你解決了嗎?我有同樣的問題。 – 2018-02-23 14:17:34