当前位置:编程学习 > C#/ASP.NET >>

这个linq怎么写 二级分类

有两张表A和B,A表是属性表,B表是A表的属性表值,他们通过ID外链,也就是说A表中的值对应B表中的多个属性值。比如(A表空调)对应(B表属性值为:大1p,大2p)  怎么写linq显示出来
类似于: linq怎么写 二级分类 --------------------编程问答-------------------- 给出表结构和一些测试数据,比如这帖子中的样式: 
http://bbs.csdn.net/topics/390431642 --------------------编程问答--------------------

  public class ProductPropertyDTO
    {
        public int Id { get; set; }
        /// <summary>
        /// 属性名
        /// </summary>
        public string Name { get; set; }
        public string Description { get; set; }
        
        public int C3ID { get; set; }
       
        public int Status { get; set; }
        public int? CreatedBy { get; set; }
        public DateTime CreatedOn { get; set; }
        public int? ModifiedBy { get; set; }
        public DateTime ModifiedOn { get; set; }
        public string CategoryThird_C3Code { get; set; }
        public string CategoryThird_C3Name { get; set; }
    }

  public int Id { get; set; }
        /// <summary>
        /// 属性值
        /// </summary>
       
        public string ValueName { get; set; }
        public string ValueDescription { get; set; }
        /// <summary>
        /// 属性ID
        /// </summary>
        
        public int PropertyId { get; set; }
        
        public int Status { get; set; }
        public int? CreatedBy { get; set; }
        public DateTime CreatedOn { get; set; }
        public int? ModifiedBy { get; set; }
        public DateTime ModifiedOn { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
       
        public int Sequence { get; set; }
        public string Property_Name { get; set; }
        public int Property_C3ID { get; set; }
--------------------编程问答-------------------- ProductProperty  的name 对应ProductPropertyValue  namevalus    他们之间通过id外链 --------------------编程问答-------------------- 想当与productProperty  的name(空调) 对应ProductPropertyValue 的valusname(1p,2p,3p)
补充:.NET技术 ,  LINQ
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,