public void createNewUserPatient(PatientCreationRequest request)
        {
            userRepository.createNewUser(request);
            var user = userRepository.getUserInfo(request.email);

            createNewPatient(request, user.id);
        }
Exemple #2
0
        public void createNewUserMedicalProfessional(MedicalProfessionalRequest request)
        {
            userRepository.createNewUser(request);
            var user = userRepository.getUserInfo(request.email);

            createNewMedicalProfessional(request, user.id);
        }
        //public Patient checkIfPatientExists(int userId)
        //{
        //    using (var context = new HackathonEntities())
        //    {
        //        return context.Patients.FirstOrDefault(x => x.UserId.Equals(userId));
        //    }
        //}

        public void createNewUserPharmacy(PharmacyCreationRequest request)
        {
            userRepository.createNewUser(request);
            var user = userRepository.getUserInfo(request.email);

            createNewPharmacy(request, user.id);
        }