使用WCF Ria取得子表的数据,一直为null

经测试,在使用关联表的过程中,直接指定了关系,即使在LINQ中查得的数据中包含了子表(调试中可显示),但数据送到客户端仍然为null。

解决方法:

在子表的实体类中,加入[Include]

    using System.ServiceModel.DomainServices.Server;

        [Include]
        public Points Points
	{
	}

posted on 2011-11-15 12:09  龙少爷  阅读(187)  评论(0编辑  收藏  举报

导航