tags:

views:

224

answers:

2

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?

+5  A: 

This is a bug of SubSonic 3.0.0.3, you should go to http://github.com/subsonic/SubSonic-3.0/tree/master, get the latest source code and build the dll yourself.

Nick Yao
so that link will always give me the latest and greatest?
Slee
looks like it- that was easy! THANKS!
Slee
Confirmed. This is 100% true. Helped me fix the same issue updating to SQLite. Thanks Nick.
tyndall
Had the same issue with Advanced/Linq Templates. A fresh build and I was fixed.
JoshRivers
A: 

I'm sorry about this, but I have same problem with Max and I've tried to download and compile with VS2008 Express Edition but the project file unsupported with VS2008 Express Edition.

If anyone willing to upload compiled latest binary file, I can only thank you for your help.

Regards,

AJ

AJ
oh yeah! I got that's file under bin\Release directory. Problem solved.
AJ