成分和 RIA
我有相关属性组合属性和 RIA 的问题。我正在使用 POCO 和 silverlight。这是我的模型:
[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 类中,此属性为空。即使具有 de Composition 属性。如何将 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
}
i have problems with related properties Composition attribut and RIA.I 'm using POCO and silverlight. here is my modele :
[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;
}
}
In client side i call Test domaine service method , in the client side the property ModeleEnvoiEaFooter is not null, but in my DomainServices class this property is null. Even with de Composition attribut. How can i send the value of ModeleEnvoiEaFooter property to Domainservices class ?
[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
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试将 ModeleEnvoiEaFooter 标记为 DataMember。
Try marking ModeleEnvoiEaFooter as a DataMember.