Exemplo n.º 1
0
 public async Task GrantTargetApp(GatewayUser user, string appId)
 {
     if (!await HasAuthorizedApp(user, appId))
     {
         var appGrant = new AppGrant
         {
             AppID         = appId,
             GatewayUserId = user.Id
         };
         _dbContext.LocalAppGrant.Add(appGrant);
         await _dbContext.SaveChangesAsync();
     }
 }
Exemplo n.º 2
0
        internal static int Update(AppGrant info)
        {
            string sql = "update AppGrant set AppId=@AppId,AppServiceId=@AppServiceId,AppFunctionId=@AppFunctionId where AppGrantId=@AppGrantId";

            return(Update <AppGrant>(con, sql, info));
        }
Exemplo n.º 3
0
        internal static int Add(AppGrant info)
        {
            string sql = "insert into AppGrant(AppId,AppServiceId,AppFunctionId) values(@AppId,@AppServiceId,@AppFunctionId)";

            return(Insert <AppGrant>(con, sql, info));
        }