public void EditCountableObjectAttribute(CountableObjectAttributes edittedAttribute) { var attribute = _context.CountableObjectAttributes.FirstOrDefault(c => c.Id == edittedAttribute.Id); attribute.Name = edittedAttribute.Name; _context.CountableObjectAttributes.Attach(attribute); _context.SaveChanges(); }
public IActionResult AddCntAttribute(CntAttributesEditModel model) { var cntAttribute = new CountableObjectAttributes() { Name = model.NewCntAttribute, }; _userAdministration.AddCountableObjectAttribute(cntAttribute); TempData["Notification"] = "Izmjene su uspješno sačuvane"; return(View("Parameters")); }
public void AddCountableObjectAttribute(CountableObjectAttributes attribute) { _context.CountableObjectAttributes.Add(attribute); _context.SaveChanges(); }