public MongoIdentityUser(string userName, string email) : this(userName)
 {
   if (email != null)
   {
     Email = new MongoUserEmail(email);
   }
 }
 public MongoIdentityUser(string userName, MongoUserEmail email) : this(userName)
 {
   if (email != null)
   {
     Email = email;
   }
 }
        public void AddUser(User user)
        {
            string email          = user.Email.Value;
            var    mongoUserEmail = new MongoUserEmail(email);

            mongoUserEmail.SetNormalizedEmail(email.ToUpper());
            user.SetEmail(mongoUserEmail);

            user.GravatarEmail = email;
            user.SetNormalizedUserName(email.ToUpper());

            Collection.InsertOne(user);
        }
 public virtual void SetEmail(MongoUserEmail mongoUserEmail)
 {
   Email = mongoUserEmail;
 }
 public virtual void SetEmail(string email)
 {
   var mongoUserEmail = new MongoUserEmail(email);
   SetEmail(mongoUserEmail);
 }
 public User(string userName, MongoUserEmail email) : base(userName, email)
 {
 }
 public virtual void SetEmail(MongoUserEmail mongoUserEmail)
 {
     Email = mongoUserEmail.NormalizedValue;
 }