public void AddEmail(string doctorId, EmailAddressInputModel emailAddressInputModel) { Doctor doctor = this.GetDoctor(doctorId); string emailId = this.emailsService.Add(emailAddressInputModel); doctor.Emails.Add(this.emailsService.GetEmail(emailId)); this.db.SaveChanges(); }
public void AddEmail(string personId, EmailAddressInputModel emailAddressInputModel) { Person person = this.GetPerson(personId); string emailId = this.emailsService.Add(emailAddressInputModel); person.Emails.Add(this.emailsService.GetEmail(emailId)); this.db.SaveChanges(); }
public void AddEmail(string relativeId, EmailAddressInputModel emailAddressInputModel) { Relative relative = this.GetRelative(relativeId); string emailId = this.emailsService.Add(emailAddressInputModel); relative.Emails.Add(this.emailsService.GetEmail(emailId)); this.db.SaveChanges(); }
public string Add(EmailAddressInputModel emailInputModel) { EmailAddress emailAddress = new EmailAddress() { Email = emailInputModel.Email }; this.db.EmailAddresses.Add(emailAddress); this.db.SaveChanges(); return(emailAddress.Id); }