public IActionResult Create(SetorConhecimento setorConhecimento) { if (ModelState.IsValid) { setorConhecimento.Id = Guid.NewGuid(); db.SetoresConhecimento.Add(setorConhecimento); db.SaveChanges(); return RedirectToAction("Index"); } return View(setorConhecimento); }
public IActionResult Edit(SetorConhecimento SetorConhecimento) { if (ModelState.IsValid) { db.Update(SetorConhecimento); db.SaveChanges(); return RedirectToAction("Index"); } return View(SetorConhecimento); }