Beispiel #1
0
        public async Task CreateUserRoleShop(int userId, int roleId, int shopId)
        {
            var userRoleShop = new UserRoleShop
            {
                UserId = userId,
                RoleId = roleId,
                ShopId = shopId
            };

            await _identityContext.UserRoleShops.AddAsync(userRoleShop);

            await _identityContext.SaveChangesAsync();
        }
Beispiel #2
0
        public async Task <IActionResult> CreateUserRoleShop(UserRoleShop userRoleShop)
        {
            await _roleService.CreateUserRoleShop(userRoleShop.UserId, userRoleShop.RoleId, userRoleShop.ShopId);

            return(Ok());
        }