0
我想在產品列表中選擇產品圖像中的一個圖像。我無法在行中使用兩個位置和功能。我的數據庫結構如下圖所示:詢問包含實體框架中的哪個子句
產品: ID 名稱
圖片: ID 名稱 狀態 的ProductID
我需要具有真正的狀態只圖像。
我爲獲得產品功能下同:(不完全)
Public Function GetProducts() As List(Of LeannModel.Product)
Dim xList As New List(Of LeannModel.Product)
Using context As New LeannEntities
xList = (From w In context.Products.Include("Image").Where(Function(i) i.Images.Where(Function(u) u.ImageBase = True)) Select w).ToList
End Using
Return xList
End Function