예제 #1
0
        private void createRolesandUsers()
        {
            DPTSDbContext context = new DPTSDbContext();

            var roleManager = new RoleManager <IdentityRole>(new RoleStore <IdentityRole>(context));
            var UserManager = new UserManager <ApplicationUser>(new UserStore <ApplicationUser>(context));
        }
예제 #2
0
 public DoctorService(IRepository <Doctor> doctorRepository,
                      IRepository <Domain.Entities.Speciality> specialityRepository,
                      IRepository <SpecialityMapping> specialityMappingRepository,
                      IAddressService addressService,
                      IRepository <AddressMapping> addressMapping,
                      IRepository <Domain.Entities.Address> address,
                      IRepository <AppointmentSchedule> appointmentScheduleRepository,
                      IRepository <SocialLinkInformation> socialLinksRepository,
                      IRepository <HonorsAwards> honorsAwardsRepository,
                      IRepository <Education> educationRepository,
                      IRepository <Experience> experienceRepository,
                      IRepository <PictureMapping> pictureMapRepository,
                      IRepository <DoctorReview> doctorReviewRepository,
                      IRepository <PatientReviewHelpfulness> helpfulnessRepository)
 {
     _doctorRepository            = doctorRepository;
     _specialityRepository        = specialityRepository;
     _specialityMappingRepository = specialityMappingRepository;
     _addressService = addressService;
     _addressMapping = addressMapping;
     _address        = address;
     _appointmentScheduleRepository = appointmentScheduleRepository;
     _socialLinksRepository         = socialLinksRepository;
     _honorsAwardsRepository        = honorsAwardsRepository;
     _educationRepository           = educationRepository;
     _experienceRepository          = experienceRepository;
     _context = new DPTSDbContext();
     _pictureMapRepository   = pictureMapRepository;
     _doctorReviewRepository = doctorReviewRepository;
     _helpfulnessRepository  = helpfulnessRepository;
 }
예제 #3
0
 public PictureService(IRepository <Picture> pictureRepository,
                       IRepository <PictureMapping> pictureMapRepository)
 {
     this._pictureRepository    = pictureRepository;
     this._pictureMapRepository = pictureMapRepository;
     _dbContext = new DPTSDbContext();
 }
예제 #4
0
 public AppointmentController(IDoctorService doctorService,
                              IAppointmentService scheduleService)
 {
     _doctorService   = doctorService;
     _scheduleService = scheduleService;
     _context         = new DPTSDbContext();
 }
예제 #5
0
 public ExportImportsController(IImportManager importManager,
                                IDoctorService doctorService,
                                DPTSDbContext context)
 {
     _importManager = importManager;
     _context       = context;
     _doctorService = doctorService;
 }
 public AppointmentController(IDoctorService doctorService,
                              IAppointmentService scheduleService,
                              ISmsNotificationService smsService)
 {
     _doctorService   = doctorService;
     _scheduleService = scheduleService;
     _context         = new DPTSDbContext();
     _smsService      = smsService;
 }
예제 #7
0
        private void createRolesandUsers()
        {
            DPTSDbContext context = new DPTSDbContext();

            var roleManager = new RoleManager <IdentityRole>(new RoleStore <IdentityRole>(context));
            var UserManager = new UserManager <ApplicationUser>(new UserStore <ApplicationUser>(context));


            // In Startup iam creating first Admin Role and creating a default Admin User
            //if (!roleManager.RoleExists("Admin"))
            //{

            //    // first we create Admin rool
            //    var role = new IdentityRole();
            //    role.Name = "Admin";
            //    roleManager.Create(role);

            //    //Here we create a Admin super user who will maintain the website

            //    var user = new ApplicationUser();
            //    user.UserName = "******";
            //    user.Email = "*****@*****.**";

            //    string userPWD = "A@Z200711";

            //    var chkUser = UserManager.Create(user, userPWD);

            //    //Add default User to Role Admin
            //    if (chkUser.Succeeded)
            //    {
            //        var result1 = UserManager.AddToRole(user.Id, "Admin");

            //    }
            //}

            // creating Creating Manager role
            //if (!roleManager.RoleExists("Manager"))
            //{
            //    var role = new IdentityRole();
            //    role.Name = "Manager";
            //    roleManager.Create(role);

            //}

            //// creating Creating Employee role
            //if (!roleManager.RoleExists("Employee"))
            //{
            //    var role = new IdentityRole();
            //    role.Name = "Employee";
            //    roleManager.Create(role);

            //}
        }
예제 #8
0
 public ImportManager(IDoctorService doctorService,
                      ISpecialityService specialityService,
                      ICountryService countryService,
                      IStateProvinceService stateProvinceService,
                      IAddressService addressService)
 {
     this._doctorService   = doctorService;
     _context              = new DPTSDbContext();
     _specialityService    = specialityService;
     _specialityService    = specialityService;
     _stateProvinceService = stateProvinceService;
     _countryService       = countryService;
     _addressService       = addressService;
 }
예제 #9
0
 public HomeController(ISpecialityService specialityService,
                       IDoctorService doctorService,
                       IAddressService addressService,
                       ICountryService countryService,
                       IStateProvinceService stateService,
                       IPictureService pictureService)
 {
     _specialityService = specialityService;
     _doctorService     = doctorService;
     UserManager        = _userManager;
     context            = new ApplicationDbContext();
     _addressService    = addressService;
     _countryService    = countryService;
     _stateService      = stateService;
     _context           = new DPTSDbContext();
     _pictureService    = pictureService;
 }
예제 #10
0
 public AccountController(IDoctorService doctorService,
                          ISmsNotificationService smsService,
                          ISpecialityService specialityService,
                          ISubSpecialityService subSpecialityService,
                          ICountryService countryService,
                          IStateProvinceService stateProvinceService,
                          IAddressService addressService,
                          IQualifiactionService qualifiactionService,
                          IPictureService pictureService)
 {
     context               = new ApplicationDbContext();
     _doctorService        = doctorService;
     _smsService           = smsService;
     _subSpecialityService = subSpecialityService;
     _specialityService    = specialityService;
     _context              = new DPTSDbContext();
     _countryService       = countryService;
     _stateProvinceService = stateProvinceService;
     _addressService       = addressService;
     _qualifiactionService = qualifiactionService;
     _pictureService       = pictureService;
 }
예제 #11
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="context">Object context</param>
 public Repository(DPTSDbContext context)
 {
     _context = context;
 }
예제 #12
0
 public ImportManager(IDoctorService doctorService)
 {
     this._doctorService = doctorService;
     _context            = new DPTSDbContext();
 }
예제 #13
0
 public ReviewCommentsService(IRepository <Domain.Entities.ReviewComments> reviewComments)
 {
     _reviewComments = reviewComments;
     _context        = new DPTSDbContext();
 }
예제 #14
0
 public SpecialityService(IRepository <Domain.Entities.Speciality> specialityRepository, IRepository <SpecialityMapping> specalityMappingRepos)
 {
     _specialityRepository  = specialityRepository;
     _specalityMappingRepos = specalityMappingRepos;
     _context = new DPTSDbContext();
 }