could not resolve property: Id of: UCommerce.EntitiesV2.Category
Hi I am getting the error could not resolve property: Id of: UCommerce.EntitiesV2.Category in c# coding in ucommerce project
My code is below , Please tell me how can i solve this
For Each CategoryId In brands If CategoryId <> 0 Then Dim ThisCategory = Category.All().SingleOrDefault(Function(x) x.CategoryId = CategoryId) For Each ThisProduct In ThisProducts If CategoryProductRelation.All().Where(Function(x) x.Category.Id = ThisCategory.Id AndAlso x.Product.Id = ThisProduct.Id).Count > 0 AndAlso TempProducts.Where(Function(x) x.Id = ThisProduct.Id).Count = 0 Then TempProducts.Add(ThisProduct) End If Next End If Next
Can you try to use CategoryId property instead of Id? Id is actually the same as CategoryId (on the Category object) though I guess for some reasons NHibernate can't map Id to the correct column in the database.
could not resolve property: Id of: UCommerce.EntitiesV2.Category
Hi I am getting the error could not resolve property: Id of: UCommerce.EntitiesV2.Category in c# coding in ucommerce project
My code is below , Please tell me how can i solve this
For Each CategoryId In brands
If CategoryId <> 0 Then
Dim ThisCategory = Category.All().SingleOrDefault(Function(x) x.CategoryId = CategoryId)
For Each ThisProduct In ThisProducts
If CategoryProductRelation.All().Where(Function(x) x.Category.Id = ThisCategory.Id AndAlso x.Product.Id = ThisProduct.Id).Count > 0 AndAlso TempProducts.Where(Function(x) x.Id = ThisProduct.Id).Count = 0 Then
TempProducts.Add(ThisProduct)
End If
Next
End If
Next
Hi Thanalban
I just want to inform you that I moved your post to the ucommerce support forum since the above issue does not seem to be Umbraco or Razor related.
Hopefully some of the uCommerce guys will find your issue in here or someone who knows a bit more about uCommerce than I do will see it.
Cheers,
Jan
Hi Thanabalan,
Can you try to use CategoryId property instead of Id? Id is actually the same as CategoryId (on the Category object) though I guess for some reasons NHibernate can't map Id to the correct column in the database.
Best regards Martin
EDIT: nevermind :)
is working on a reply...