-
-
Save conanak99/0a154f956ed5b87b759c737394e13817 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Cart là module cấp cao | |
public class Cart | |
{ | |
public void Checkout(int orderId, int userId) | |
{ | |
// Database, Logger, EmailSender là module cấp thấy | |
Database db = new Database(); | |
db.Save(orderId); | |
Logger log = new Logger(); | |
log.LogInfo("Order has been checkout"); | |
EmailSender es = new EmailSender(); | |
es.SendEmail(userId); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment