是否可能在新赫伯特这样做?
Product GetSpecificProduct()
{
return session.CreateSQLQuery("SELECT * FROM Products WHERE price =
$500").UniqueResult<Product>();
}
When I try to run this code I get:
系统. InvalidCastException: Unable to em Object of category System. 反对产品类型。
或者,我是否必须使用NHibernate query语言?