Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Using TransactionScope with Entity Framework code first and universal providers
- using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required))
- {
- MembershipCreateStatus createStatus;
- MembershipUser user = Membership.CreateUser(model.UserName, model.Password, model.UserName, null, null, true, null, out createStatus);
- //add objects to the DbContext db
- db.SaveChanges();
- scope.Complete();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement