public ActionResult Create(EducationLevelRegisterModel modelArea) { var area = new EducationLevel { Name = modelArea.Name, }; _areaReposity.Create(area); const string title = "Nivel De Educacion Agregado"; var content = "El area " + area.Name + " ha sido agregada exitosamente."; _viewMessageLogic.SetNewMessage(title, content, ViewMessageType.SuccessMessage); return RedirectToAction("Index"); }
public EducationLevel Update(EducationLevel itemToUpdate) { _context.Entry(itemToUpdate).State = EntityState.Modified; SaveChanges(); return itemToUpdate; }
public EducationLevel UpdateAreaFromAreaEditModel(EducationLevel areaEditModel, EducationLevel area) { area.Name = areaEditModel.Name; return Update(area); }
public EducationLevel Create(EducationLevel itemToCreate) { var role = _context.EducationLevels.Add(itemToCreate); _context.SaveChanges(); return role; }