Advertisement
Guest User

Untitled

a guest
Apr 20th, 2012
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Using TransactionScope with Entity Framework code first and universal providers
  2. using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required))
  3. {
  4. MembershipCreateStatus createStatus;
  5. MembershipUser user = Membership.CreateUser(model.UserName, model.Password, model.UserName, null, null, true, null, out createStatus);
  6.  
  7. //add objects to the DbContext db
  8.  
  9. db.SaveChanges();
  10. scope.Complete();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement