Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
        public string Add(EmailAddressInputModel emailInputModel)
        {
            EmailAddress emailAddress = new EmailAddress()
            {
                Email = emailInputModel.Email
            };

            this.db.EmailAddresses.Add(emailAddress);
            this.db.SaveChanges();

            return(emailAddress.Id);
        }