hi every body
i use nhibernate in my program and i use it to implement more than 14 classes
but i have this problem and i don't understand why nhibernate save objects to database
this is my code
Code:
ISession session = NHibernateHelper.GetCurrentSession();
ITransaction tx = session.BeginTransaction();
IQuery query = session.CreateQuery("select e from Employ as e");
IList allEmploys = query.List();
NHibernateHelper.CloseSession();
//////get employs from database
((Library.Model_Classes.Employ)(allEmploys[0])).Fname = "www";
((Library.Model_Classes.Employ)(allEmploys[0])).Sname = "www";
///////////update the first one
session = NHibernateHelper.GetCurrentSession();
tx = session.BeginTransaction();
query = session.CreateQuery("select e from Employ as e");
allEmploys = query.List();
NHibernateHelper.CloseSession();
/// now i get allEmploys[0].Fname="www" in database and in allEmploys List /// i don't save any thing but the nhibernate save my changes to database
i don't want to save any thing with out use (save,update,..........) operation
thank you very much for your help