public ActionResult CreateNyhet([Bind(Include = "Ämne,Innehåll")] NyhetModel model) { if (ModelState.IsValid) { db.Add(model); return(RedirectToAction("Index")); } return(View(model)); }
public void Add(NyhetModel nyhet) { Nyheter.Add(nyhet); this.SaveChanges(); }