Save changes twice to db
Hi. I have a question about creating a new object, saving it to database, then changing some property to fire an event, and save to db again. I can't get it to work. My code goes like this:
1. Create a new Order
2. Set Order.Status = New
3. Save changes to db
4.Set Order.Status = Placed (event fires)
5. Save changes to db
I've tried some various solutions out of desperation.. 🙂
2 Replies
Describe how it doesn't work, "it doesn't work" tells the reader nothing. And show some code, we don't know how you are creating, updating and saving changes
It magically started working today