public ActionResult Ekle(Eczane eczane) { if (!ModelState.IsValid) { return View(eczane); } _eczaneRepository.Insert(eczane); _eczaneRepository.Save(); return RedirectToAction("Index"); }
public ActionResult Duzenle(Eczane eczane) { if (!ModelState.IsValid) { return new HttpStatusCodeResult(HttpStatusCode.BadRequest); } _eczaneRepository.Update(eczane); _eczaneRepository.Save(); return RedirectToAction("Index"); }
public void Update(Eczane obj) { _context.Eczaneler.AddOrUpdate(obj); }
public void Insert(Eczane obj) { _context.Eczaneler.Add(obj); }