Call multiple service method in one transaction
问题 Forgive me I am not good at EF6. If I make some mistake . Please help me to correct it. Thanks. Firstly I want to implement the business logic in my service layer like below. public class userService { void createWithCommit(User user) { MyEntityContext db= new MyEntityContext (); ... db.Users.add(user);//Add a new user entity .... Work w = new Work(); ... db.Works.add(w);//Add a new work entity db.savechanges();//commit the changes which will insert 2 new record . one is user . another is