日期:2014-05-20  浏览次数:20815 次

nhibernate 删除
public partial class Form1 : Form    {        private NHibernateSample.Data.NHibernateSample _Sample;        private ISession _ISession;        private NHibernateSample.Data.NHibernateHelper _NHHelp;        public Form1()        {            InitializeComponent();            _NHHelp = new NHibernateHelper();            _ISession = _NHHelp.GetSession();            _Sample = new NHibernateSample.Data.NHibernateSample(_ISession);        }        private void Form1_Load(object sender, EventArgs e)        {            IList<Customer> cstList = _ISession.CreateQuery("from Customer").List<Customer>();                foreach (Customer cst in cstList)                {                    _ISession.Delete(cst);                    _ISession.Flush();                }        }单步调试每次到 _ISession.Flush();之后窗体就出来,怀疑这点出错。望 高手指教

------解决方案--------------------
报什么错误?