public IActionResult Edit(Guid id, Newsletter newsletter) { var model = _newsletterRepository.GetNewsletters() .FirstOrDefault(x => id == x.Id); model.Title = newsletter.Title; model.Desciption = newsletter.Desciption; model.BodyText = newsletter.BodyText; _newsletterRepository.Update(model); _newsletterRepository.Save(); return(RedirectToAction("ViewAll", "Newsletter")); }