Beispiel #1
0
        public async Task RemoveAsync(string primaryKey)
        {
            var model = await _dbContext.Permissions.FirstOrDefaultAsync(w => w.Id == primaryKey);

            if (model == null)
            {
                return;
            }
            _dbContext.Remove(model);
        }
Beispiel #2
0
        public async Task RemoveAsync(int primaryKey)
        {
            var model = await _dbContext.Roles.FirstOrDefaultAsync(w => w.Id == primaryKey);

            if (model == null)
            {
                return;
            }
            _dbContext.Remove(model);
        }