У меня есть следующий метод. Это прекрасно работает, если я удаляю следующую строку
.Add(Restrictions.Eq("Product.IsPopItem", true))
Сообщение об ошибке
не удалось разрешить свойство: Product.IsPopItem из: EStore.Domain.Model.ProductCategory
Я уверен, что «Product.IsPopItem» отображается правильно, так как я могу вызвать это свойство. Нужно ли добавить несколько критериев?
public ICollection<ProductCategory> FindByCompanyIdAndCategoryIdAndIsPop(int companyId, int id)
{
var products = _session
.CreateCriteria(typeof(ProductCategory))
.Add(Restrictions.Eq("CompanyId", companyId))
.Add(Restrictions.Eq("CategoryId", id))
.Add(Restrictions.Eq("Product.IsPopItem", true))
.List<ProductCategory>();
return products;
}