小编Fai*_*eem的帖子

数据库架构到底是什么?

我是CS领域的新手,一件事是,在问这个问题之前,我已经在Google上进行了搜索,但是这使我在找到的两个定义之间更加困惑,所以我问哪个是正确的?因此,在此链接中,我找到了多个答案,哪个是正确的? 数据库模式的目的是什么?

我找到了这个。我认为令我困惑的是,这两个定义互不相同。

1)SQL模式是对象的容器。例如,您可能有一个大型企业应用程序,那么,将不同的模式用于不同的目的(例如,将与HR相关的表放入HR模式,将与会计相关的表放入“计费”模式等)是一个好习惯。模式可以由任何用户拥有,并且所有权可以转让。

2)数据库模式是定义,描述了数据库的整个配置,包括其所有表,关系,索引等

我的问题不同,我已经阅读了多个可用的答案,但是我发现了多个答案,这让我更加困惑

sql-server

4
推荐指数
1
解决办法
3456
查看次数

如何更新 ASP.NET Core 中的声明

我使用以下代码添加了声明

var claims = new List<Claim>
                 {
                    new Claim(Constants.ClaimTypes.BUSINESS_ID, user.BusinessID.ToString()),
                    new Claim(Constants.ClaimTypes.NAME, user.FullName),
                    new Claim(Constants.ClaimTypes.IMAGE, user.ProfileUrl ?? user.LogoUrlEn ?? user.LogoUrlEn ?? ""),
                    new Claim(Constants.ClaimTypes.EMAIL, user.Email),
                    new Claim(Constants.ClaimTypes.USER_ID, user.UserID.ToString()),
                    new Claim(Constants.ClaimTypes.ROLE, user.RoleID.ToString()),
                    new Claim(Constants.ClaimTypes.RIGHTS, string.Join(',', user.RolesRights.Select(S => $"{S.EntityName}|{S.EntityID}|{S.RightID}")))
                };

var claimsIdentity = new ClaimsIdentity(claims, CookieAuthenticationDefaults.AuthenticationScheme);

var authProperties = new AuthenticationProperties
        {
            AllowRefresh = true,
            IsPersistent = true,
            RedirectUri = "/Authentication/Login"
        };

await HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme,
                              new ClaimsPrincipal(claimsIdentity),
                              authProperties);
Run Code Online (Sandbox Code Playgroud)

当有人更新个人资料图片时,我需要更新声明,我需要更新它,我该怎么做?

我尝试了几种解决方案,但没有任何效果。

当有人更新个人资料图片时,必须注销并再次登录才能看到效果。

asp.net-core asp.net-core-identity

3
推荐指数
1
解决办法
2162
查看次数