示例#1
0
        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));
            }
        }
示例#2
0
        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);
            }
        }