Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UserService"/> class.
 /// </summary>
 /// <param name="ctx">The ctx<see cref="GoodRussianDbContext"/></param>
 /// <param name="userManager">The userManager<see cref="UserManager{ApplicationUser}"/></param>
 /// <param name="roleManager">The roleManager<see cref="RoleManager{MyIdentityRole}"/></param>
 /// <param name="logger">The logger<see cref="ILogger{UserService}"/></param>
 public UserService(GoodRussianDbContext ctx,
                    UserManager <ApplicationUser> userManager,
                    RoleManager <MyIdentityRole> roleManager,
                    //EmailService emailService,
                    ILogger <UserService> logger
                    )
 {
     _ctx         = ctx;
     _userManager = userManager;
     _roleManager = roleManager;
     _logger      = logger;
 }
        public xCourseDescController(GoodRussianDbContext context, IWebHostEnvironment appEnvironment, IConfiguration configuration)
        {
            _context        = context;
            _appEnvironment = appEnvironment;
            _configuration  = configuration;
            FilePath        = _appEnvironment.WebRootPath + "/" + _configuration["fileStoragePath"] + "/";

            if (!Directory.Exists(FilePath))
            {
                Directory.CreateDirectory(FilePath);
            }
        }
Example #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AccountController"/> class.
        /// </summary>
        /// <param name="identityContext">The identityContext<see cref="MySysIdentityDbContext"/></param>
        /// <param name="context">The context<see cref="GoodRussianDbContext"/></param>
        /// <param name="userService">The userService<see cref="UserService"/></param>
        /// <param name="userManager">The userManager<see cref="UserManager{ApplicationUser}"/></param>
        /// <param name="roleManager">The roleManager<see cref="RoleManager{MyIdentityRole}"/></param>
        /// <param name="signInManager">The signInManager<see cref="SignInManager{ApplicationUser}"/></param>
        /// <param name="jwtOptions">The jwtOptions<see cref="IOptions{JwtIssuerOptions}"/></param>
        /// <param name="logger">The logger<see cref="ILogger{AccountController}"/></param>
        public AccountController(MySysIdentityDbContext identityContext,
                                 GoodRussianDbContext context,
                                 UserService userService,
                                 UserManager <ApplicationUser> userManager,
                                 RoleManager <MyIdentityRole> roleManager,
                                 SignInManager <ApplicationUser> signInManager,
                                 IOptions <JwtIssuerOptions> jwtOptions,
                                 ILogger <AccountController> logger)
        {
            _identityContext = identityContext;
            _context         = context;
            _userService     = userService;
            _userManager     = userManager;
            _roleManager     = roleManager;
            _signInManager   = signInManager;
            _jwtOptions      = jwtOptions.Value;
            _logger          = logger;

            _serializerSettings = new JsonSerializerSettings
            {
                Formatting = Formatting.Indented
            };
        }
Example #4
0
 public XSubjectController(GoodRussianDbContext context, IWebHostEnvironment appEnvironment)
 {
     _context        = context;
     _appEnvironment = appEnvironment;
 }
 public XCoursePriceController(GoodRussianDbContext context, IWebHostEnvironment appEnvironment)
 {
     _context        = context;
     _appEnvironment = appEnvironment;
 }
 public XInstructorStatusController(GoodRussianDbContext context, IWebHostEnvironment appEnvironment)
 {
     _context        = context;
     _appEnvironment = appEnvironment;
 }
Example #7
0
 public XUserRegistartionController(GoodRussianDbContext context, IWebHostEnvironment appEnvironment)
 {
     _context        = context;
     _appEnvironment = appEnvironment;
 }
 public XUserProfileController(GoodRussianDbContext context, IWebHostEnvironment appEnvironment)
 {
     _context        = context;
     _appEnvironment = appEnvironment;
 }
Example #9
0
 public XScheduleItemController(GoodRussianDbContext context, IWebHostEnvironment appEnvironment)
 {
     _context        = context;
     _appEnvironment = appEnvironment;
 }