public MembershipCreateStatus createUser(MembershipUser user) { Customer newUser = new Customer(); newUser.Name = user.UserName; newUser.Password = user.ProviderUserKey.ToString(); newUser.IsAdmin = false; try { this.ctx.Customers.AddObject(newUser); this.ctx.SaveChanges(); } catch (Exception e) { return MembershipCreateStatus.UserRejected; } return MembershipCreateStatus.Success; }
private void FixupCustomer(Customer previousValue) { if (previousValue != null && previousValue.Animations.Contains(this)) { previousValue.Animations.Remove(this); } if (Customer != null) { if (!Customer.Animations.Contains(this)) { Customer.Animations.Add(this); } if (CustomerId != Customer.CustomerId) { CustomerId = Customer.CustomerId; } } }