Example #1
0
 public WebStore_StudyDbInitializer(
     UserManager <User> userManager,
     RoleManager <Role> roleManager,
     WebStore_StudyDb dbContext,
     ILogger <WebStore_StudyDbInitializer> logger)
 {
     this.userManager = userManager;
     this.roleManager = roleManager;
     this.dbContext   = dbContext;
     this.logger      = logger;
 }
Example #2
0
 public RolesApiController(WebStore_StudyDb db)
 {
     roleStore = new RoleStore <Role>(db);
 }
 public SqlOrderService(WebStore_StudyDb context, UserManager <User> userManager)
 {
     this.context     = context;
     this.userManager = userManager;
 }
 public SqlEmployeeData(WebStore_StudyDb dbContext)
 {
     this.dbContext = dbContext;
 }
Example #5
0
        public async Task AddToRoleAsync([FromBody] User user, string role, [FromServices] WebStore_StudyDb db)
        {
            await userStore.AddToRoleAsync(user, role);

            await db.SaveChangesAsync();
        }
 public SqlProductData(WebStore_StudyDb dbContext)
 {
     this.dbContext = dbContext;
 }
Example #7
0
        public async Task RemoveLoginAsync([FromBody] User user, string LoginProvider, string ProviderKey, [FromServices] WebStore_StudyDb db)
        {
            await userStore.RemoveLoginAsync(user, LoginProvider, ProviderKey);

            await db.SaveChangesAsync();
        }
Example #8
0
        public async Task AddLoginAsync([FromBody] AddLoginDto login, [FromServices] WebStore_StudyDb db)
        {
            await userStore.AddLoginAsync(login.User, login.UserLoginInfo);

            await db.SaveChangesAsync();
        }
Example #9
0
 public UsersApiController(WebStore_StudyDb db)
 {
     userStore = new UserStore <User, Role, WebStore_StudyDb>(db);
 }
Example #10
0
        public async Task RemoveClaimsAsync([FromBody] RemoveClaimDto ClaimInfo, [FromServices] WebStore_StudyDb db)
        {
            await userStore.RemoveClaimsAsync(ClaimInfo.User, ClaimInfo.Claims);

            await db.SaveChangesAsync();
        }
Example #11
0
 public SqlBlogData(WebStore_StudyDb dbContext)
 {
     this.dbContext = dbContext;
 }