public void Can_add_chiusura() { HibernateHelper.Init(); using (ISession session = HibernateHelper.Open()) using (ITransaction transaction = session.BeginTransaction()) { session.Save(new Chiusura { DataFine = DateTime.Today, DataInizio = DateTime.Today, Descrizione = "perchè son robe" }); transaction.Commit(); } }
public void Can_add_corso() { HibernateHelper.Init(); Corso c1 = new Corso { Codice = "Cod1", Descrizione = "Corso Figo" }; using (ISession session = HibernateHelper.Open()) using (ITransaction transaction = session.BeginTransaction()) { session.Save(c1); transaction.Commit(); } }
public void Can_add_stagione() { HibernateHelper.Init(); Stagione c1 = new Stagione { Corrente = false, Descrizione = "ci sarà sicuro il sole" }; using (ISession session = HibernateHelper.Open()) using (ITransaction transaction = session.BeginTransaction()) { session.Save(c1); transaction.Commit(); } }
public void Can_add_persona() { HibernateHelper.Init(); Persona p1 = new Persona { Nome = "Qualcuno", DataNascita = new DateTime(1981, 12, 12), Male = true }; using (ISession session = HibernateHelper.Open()) using (ITransaction transaction = session.BeginTransaction()) { session.Save(p1); transaction.Commit(); } }