Exemple #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));
        }
Exemple #2
0
        public async Task <bool> DeleteAsync_Character(Character data)
        {
            var result = await App.Database.DeleteAsync(data);

            if (result == 1)
            {
                return(true);
            }
            return(false);
        }
Exemple #3
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));
        }
Exemple #4
0
        // Character
        public async Task <bool> AddAsync_Character(Character data)
        {
            _characterDataset.Add(data);

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