public ActionResult Create(Kullanici model) { try { using (KullaniciRepository repo = new KullaniciRepository()) { model.KayitTarihi = DateTime.Now; repo.Ekle(model); } return(RedirectToAction("Index")); } catch { return(View(model)); } }
public Kullanici KullaniciEkle(Kullanici entity) { try { using (var repo = new KullaniciRepository()) { if (repo.Ekle(entity)) { return(entity); } } return(null); } catch (Exception ex) { throw new Exception("KullaniciBusiness:KullaniciRepository:Ekleme Hatası", ex); } }