Ejemplo n.º 1
0
        public async Task <bool> AddAsync(ModifyLog log)
        {
            _dbContext.ModifyLogs.Add(log);
            int x = await _dbContext.SaveChangesAsync();

            return(x > 0);
        }
Ejemplo n.º 2
0
        public async Task <bool> AddAsync(Setting setting)
        {
            await _dbContext.Settings.AddAsync(setting);

            int x = await _dbContext.SaveChangesAsync();

            return(x > 0);
        }
Ejemplo n.º 3
0
        public async Task <bool> AddRangeAsync(List <SysLog> logs)
        {
            await _dbContext.SysLogs.AddRangeAsync(logs);

            int x = await _dbContext.SaveChangesAsync();

            return(x > 0);
        }
Ejemplo n.º 4
0
        public async Task <bool> AddAsync(App app)
        {
            await _dbContext.Apps.AddAsync(app);

            int x = await _dbContext.SaveChangesAsync();

            var result = x > 0;

            return(result);
        }
Ejemplo n.º 5
0
        public async Task <bool> AddAsync(ServerNode node)
        {
            await _dbContext.ServerNodes.AddAsync(node);

            int x = await _dbContext.SaveChangesAsync();

            var result = x > 0;

            return(result);
        }
Ejemplo n.º 6
0
        public async Task <bool> AddAsync(Config config)
        {
            await _dbContext.Configs.AddAsync(config);

            int x = await _dbContext.SaveChangesAsync();

            var result = x > 0;

            if (result)
            {
                ClearAppPublishedConfigsMd5Cache(config.AppId);
            }

            return(result);
        }
Ejemplo n.º 7
0
        public async Task <bool> AddSysLogSync(SysLog log)
        {
            await _dbContext.SysLogs.AddAsync(log);

            int x = await _dbContext.SaveChangesAsync();

            return(x > 0);
        }