NHibernate - Where ISession.Query<T>() is located
来源:互联网 发布:网络诈骗手段常见哪些 编辑:程序博客网 时间:2024/06/05 19:13
When I try to compile the following code
using System; using System.Collections.Generic; using System.Reflection; using System.Linq; using NHibernate; namespace NewNHTest { class A { } class Program { static void Main(string[] args) { ISession session; var q = session.Query<A>(); } } }
I get the following error:
'NHibernate.ISession' does not contain a definition for 'Query' and no extension method 'Query' accepting a first argument of type 'NHibernate.ISession' could be found (are you missing a using directive or an assembly reference?)
NHibernate.dll version is 3.0.0.4000.The .Net version of project is 3.5.
What am I doing wrong?Thank you for your help!
ISession.Query is new to NH3 and is an extension method. Try "using NHibernate.Linq" and it should be resolved fine.
转载自:http://stackoverflow.com/questions/4666665/nhibernate-where-isession-queryt-is-located
- NHibernate - Where ISession.Query<T>() is located
- Where is sys/types.h located?
- NHibernate中ISession的Flush理解
- Metasploit - ERROR: cannot discover where libxml2 is located on your system
- How to: Implement CopyToDataTable<T> Where the Generic Type T Is Not a DataRow
- 保存流 出现错误:[FireDAC][Phys]-329. Cannot generate update query. WHERE condition is empty
- Nhibernate Query Example (use HQL)
- NHibernate条件查询(Criteria Query)
- The request filtering module is configured to deny a request where the query string is too long.
- is not mapped nhibernate
- Please ensure that adb is correctly located
- Please ensure that adb is correctly located
- Please ensure that adb is correctly located
- ensure that adb is correctly located at......
- Class A<T> where T
- Two useful transaction codes to search the T-TCODE where is in SAP menu tree
- I don't know where is the sky that I can touch
- where T : new()
- hdu Bus System(floyd)
- Javascript -- 函数及基本数据类型
- 2010-10-21 14:55 把自己的窗口从TASKBAR上干掉!【转】
- xml简单易懂的格式
- 关于使用highchart控件的心得。。
- NHibernate - Where ISession.Query<T>() is located
- google.load() 方法开发人员指南
- javascript:void(0)
- 设计模式C++实现(10)——桥接模式
- SqlDataReader的合适关闭方法?
- 想你,但不爱你
- First Sentence Javadoc
- mfc 托盘技术(taskbar status area)
- 讲解ORACLE JOB INTERVAL参数设置