Ejemplo n.º 1
0
 public ActionResult Create(Models.dukkan Dukkan)
 {
     using (var session = NhibernateHelper.OpenSession())
     {
         session.SaveOrUpdate(Dukkan);
         session.Flush();
     }
     return(RedirectToAction("Index"));
 }
Ejemplo n.º 2
0
 public ActionResult Edit(int id, Models.dukkan Dukkan)
 {
     using (var session = NhibernateHelper.OpenSession())
     {
         var Dukkans = session.Query <Models.dukkan>().FirstOrDefault(x => x.Id_Zup == id);
         Dukkans.Ad      = Dukkan.Ad;
         Dukkans.Telefon = Dukkan.Telefon;
         session.SaveOrUpdate(Dukkan);
         session.Flush();
     }
     return(RedirectToAction("Index"));
 }