public ValidateUserEmail(AssociationUserEmail email)
 {
     _email = email;
 }
Ejemplo n.º 2
0
 public void RemoveAdditionalEmail(int id)
 {
     using (var db = new LomsContext())
     {
         var email = new AssociationUserEmail() { Id = id };
         db.AssociationUserEmails.Attach(email);
         db.AssociationUserEmails.DeleteObject(email);
         db.SaveChanges();
     }
 }
Ejemplo n.º 3
0
     public bool Equals(AssociationUserEmail other)
     {
         if (ReferenceEquals(null, other)) return false;
         if (ReferenceEquals(this, other)) return true;
 		if (other.Id == 0 && Id == 0)
 			return false;
 		else
 			return other.Id == Id;
     }
Ejemplo n.º 4
0
        public AssociationUserEmail SaveAdditionalEmail(AssociationUserEmail email)
        {
            using (var db = new LomsContext())
            {
                db.AssociationUserEmails.ApplyChanges(email);
                db.SaveChanges();

                return db.AssociationUserEmails.FirstOrDefault(a => a.Id == email.Id);
            }
        }