【发布时间】:2019-08-21 07:20:18
【问题描述】:
我有两个表 DefaultAttributes 和 CustomAttributes。
DefaultAttributeTable:
1. Id
2. Product
4. Description
CustomAtrributeTable:
1. Id
2. DefaultAttributeMappingId(FK from DefaultAttributeTable)
3. CustomAtrributeName
4. CustomeAttributeValue
用户输入的条目:
用户更新值产品 -> 蔬菜、描述 -> 家居用品、IsOrganic(已创建自定义属性)-> True 和 IsDisposable(已创建自定义属性)-> True
用户更新值 Product -> Fruits, Description -> House Hold Item, IsOrganic(Custom Attribute created) -> True and IsDisposable(Custom Attribute created) -> True
用户更新值 Product -> Plastic, Description -> House Hold Item, IsOrganic(Custom Attribute created) -> False and IsDisposable(Custom Attribute created) -> False
那么表格中的值就会更新
默认属性表:
我想组合这两个表并选择 Id、product、IsOrganic、IsDisposable 并根据 isorganic 列过滤值。此外,自定义属性列名称应取自 CustomAtrributeTable。请向我建议如何在 SQL 和 Linq Query 中实现它。过滤后的值应该是
【问题讨论】:
-
@添加了一个答案,你可能想看看
标签: sql postgresql linq