C
C#•3y ago
redfoxx

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
Brady Kelly
Brady Kelly•3y ago
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
redfoxx
redfoxxOP•3y ago
It magically started working today

Did you find this page helpful?