Пример #1
0
        public async Task <bool> DeleteAsync_Character(Character data)
        {
            var myData = _characterDataset.FirstOrDefault(arg => arg.Id == data.Id);

            _characterDataset.Remove(myData);

            return(await Task.FromResult(true));
        }
Пример #2
0
        public async Task <bool> UpdateAsync_Character(Character data)
        {
            var myData = _characterDataset.FirstOrDefault(arg => arg.Id == data.Id);

            if (myData == null)
            {
                return(false);
            }

            myData.update(data);

            return(await Task.FromResult(true));
        }
Пример #3
0
        // Character
        public async Task <bool> AddAsync_Character(Character data)
        {
            _characterDataset.Add(data);

            return(await Task.FromResult(true));
        }