Seems fairly straight forward and simple, I am doing the following and getting an 'Object reference not set to an instance of an object.' error. It's a very simple update.
[AcceptVerbs(HttpVerbs.Post)][Authorize(Roles="admin")][ValidateInput(false)]
public ActionResult SaveContent(int id, string content)
{
var page = _repos.Single<Models.Page>(p=>p.PageID == id);
page.PageContent = content;
_repos.Update(page);
return RedirectToAction("Index",new { pagename=page.Name});
}
I can see in the debugger that I am actually getting my object and updating it with new values but the _repos.Update(page); chokes every time.
Anyone else having this issue?