public SecretaryDTO ConvertEntityToDTO(Project.Model.Secretary entity) { try { return(new SecretaryDTO( entity.Id, _addressConverter.ConvertEntityToDTO(entity.Address), entity.FirstName, entity.LastName, entity.Jmbg, entity.TelephoneNumber, entity.Gender, entity.DateOfBirth, entity.Salary, entity.AnnualLeave, entity.WorkingHours, entity.Email, entity.Password )); } catch (System.Exception) { return(new SecretaryDTO()); } }
public PatientDTO ConvertEntityToDTO(Project.Model.Patient entity) { try { return(new PatientDTO( entity.Id, _addressConverter.ConvertEntityToDTO(entity.Address), entity.FirstName, entity.LastName, entity.Jmbg, entity.TelephoneNumber, entity.Gender, entity.DateOfBirth, entity.InsurenceNumber, entity.Profession, entity.BloodType, entity.Height, entity.Weight, entity.Email, entity.Password)); } catch (System.Exception) { return(new PatientDTO()); } }
public GuestDTO ConvertEntityToDTO(Guest entity) => new GuestDTO( (entity.Address == null) ? new AddressDTO() : _addressConverter.ConvertEntityToDTO(entity.Address), entity.FirstName, entity.LastName, entity.Jmbg, entity.TelephoneNumber, entity.Gender, entity.DateOfBirth, entity.InsurenceNumber, entity.Profession, entity.BloodType, entity.Height, entity.Weight);