Пример #1
0
 public void addChild(Kind k)
 {
     using (var session = sessionFactory.OpenSession())
     {
         // retreive all stores and display them
         using (var transaction = session.BeginTransaction())
         {
             session.SaveOrUpdate(k);
             transaction.Commit();
         }
     }
 }
Пример #2
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     Database db = new Database();
     Kind k = new Kind { Vorname = TextBox1.Text, Nachname = TextBox2.Text, Geburtstag = DateTime.Parse(TextBox3.Text) };
     db.addChild(k);
 }
Пример #3
0
 public virtual void AddNewChild(Kind k)
 {
     k.ChildUser = this;
     Children.Add(k);
 }