public ActionResult Kaydet(PersonelViewModel model) { model.Departman = 1; Personell personel = new Personell(); PersonelRepository personelRepository = new PersonelRepository(); personel.Ad = model.Ad; personel.Soyad = model.Soyad; personel.Departman = model.Departman; personel.İzinGunu = model.İzinGunu; personelRepository.Add(personel); personelRepository.Save(); return(RedirectToAction("Index", "Home")); }
public IActionResult Create(Kisi kisi) { PersonelRepository.Add(kisi); return(View("Index")); }