Exemple #1
0
        public static TherapistDTO MapTherapistToTherapistDTO(Therapist therapist)
        {
            TherapistDTO thDTO = new TherapistDTO()
            {
                Email       = therapist.Email,
                Firstname   = therapist.FirstName,
                Lastname    = therapist.LastName,
                TherapistId = therapist.TherapistId
            };

            return(thDTO);
        }
Exemple #2
0
 public static GetTherapistDetailsDTO MapTherapistToGetTherapistDetailsDTO(Therapist therapist)
 {
     return(new GetTherapistDetailsDTO
     {
         City = therapist.City,
         Clients = new List <UserDTO>(therapist.ClientList.Select(client => User.MapUserToUserDTO(client, client.Categories.Select(c => c.Category).ToList())).ToList()),
         Email = therapist.Email,
         FirstName = therapist.FirstName,
         HouseNumber = therapist.HouseNumber,
         LastName = therapist.LastName,
         OpeningTimes = therapist.OpeningTimes,
         PhoneNumber = therapist.PhoneNumber,
         PostalCode = therapist.PostalCode,
         Street = therapist.Street,
         TherapistId = therapist.TherapistId,
         TherapistType = therapist.TherapistType,
         Website = therapist.Website
     });
 }
Exemple #3
0
        public static Therapist MapAddTherapistDTOToTherapist(AddTherapistDTO therapist, TherapistType type)
        {
            Therapist ther = new Therapist
            {
                City          = therapist.City,
                Email         = therapist.Email,
                FirstName     = therapist.FirstName,
                HouseNumber   = therapist.HouseNumber,
                LastName      = therapist.LastName,
                PhoneNumber   = therapist.PhoneNumber,
                PostalCode    = therapist.PostalCode,
                Street        = therapist.Street,
                TherapistType = type,
                Website       = therapist.Website
            };

            ther.OpeningTimes = therapist.OpeningTimes;
            return(ther);
        }
Exemple #4
0
 public void AddTherapist(Therapist therapist) => Therapists.Add(new TherapistUser()
 {
     Therapist = therapist, TherapistId = therapist.TherapistId, User = this, UserId = this.UserId
 });
Exemple #5
0
 public static Therapist MapEditTherapistDTOToTherapist(EditTherapistDTO therapist, Therapist edited, TherapistType tt)
 {
     edited.City          = therapist.City;
     edited.Email         = therapist.Email;
     edited.FirstName     = therapist.FirstName;
     edited.HouseNumber   = therapist.HouseNumber;
     edited.LastName      = therapist.LastName;
     edited.PhoneNumber   = therapist.PhoneNumber;
     edited.PostalCode    = therapist.PostalCode;
     edited.Street        = therapist.Street;
     edited.Website       = therapist.Website;
     edited.TherapistType = tt;
     return(edited);
 }