Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Save(){
- //validate
- if (this.OrderItems.Count == 0)
- throw new Exception ("You need at least one order item");
- //so the user code does not have to do this
- this.DateTimeModified = DateTime.Now;
- saveToDataBase();
- //after saving to the DB, the order amount is greater than $3000, notify certain people
- if (OrderAmount >= 3000)
- notifyPersonell();
- }
- order.ValidateOrder();
- context.SaveChanges();
- order.AfterOrderChanged();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement