West Wind Web Toolkit for ASP.NET
Re: Updating entity - getting error
03/12/2010
12:05:07 PM
2VX0PWIUJ Show this entire thread in new window
Gratar Image based on email address
From:
Paul Mrozowski
To:
Matt Slay 
Attachments:
None
One thing that I see that looks funny is that you are calling this.UpdateStatus(this.Entity); which passes a parameter, but I don't see where you have a method named UpdateStatus() that accepts a parameter. That alone should cause a compiler error.

Another matter... Why not use this.Save() rather than this.Save(entity)? Looking at the WW source code for the Save() method shows that any time you pass in a entity, it creates a new context, and then attempts to InsertOnSubmit() for new records, or Attach() for existing records then it calls SubmitChanges().

Why not just do a plain old Save()?


That's just a mistype in my post. The second UpdateStatus accepts the entity parameter. In my case I wanted to support both scenarios - saving current entity or the passed in one. But I just removed entity from the Save() as a test and it appears to work. No idea why there would be a difference by doing that, though. Not really in the mood to trace through the code tonight, maybe next week. Thanks.

-Paul

West Wind Web Monitor