/// <summary>
        /// Delete account type by id from database.
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task DeleteItem(int id)
        {
            var accountType = await _dbContext.AccountTypes.FindAsync(id);

            _dbContext.AccountTypes.Remove(accountType);

            await _dbContext.SaveChangesAsync();
        }
Esempio n. 2
0
        /// <summary>
        /// Delete category item by Id from database.
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task DeleteItem(int id)
        {
            var category = await _dbContext.Categories.FindAsync(id);

            _dbContext.Categories.Remove(category);

            await _dbContext.SaveChangesAsync();
        }
Esempio n. 3
0
        public async Task DeleteItem(string id)
        {
            var currency = await _dbContext.Currencies.FindAsync(id);

            _dbContext.Currencies.Remove(currency);

            await _dbContext.SaveChangesAsync();
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task DeleteItem(int id)
        {
            var personType = await _dbContext.PersonTypes.FindAsync(id);

            _dbContext.PersonTypes.Remove(personType);

            await _dbContext.SaveChangesAsync();
        }
        public async Task DeleteItem(int id)
        {
            var transactionType = await _dbContext.TransactionTypes.FindAsync(id);

            _dbContext.TransactionTypes.Remove(transactionType);

            await _dbContext.SaveChangesAsync();
        }
Esempio n. 6
0
        public async Task DeleteItem(int id)
        {
            var person = await _dbContext.People.FindAsync(id);

            _dbContext.People.Remove(person);

            await _dbContext.SaveChangesAsync();
        }
        public async Task DeleteItem(int id)
        {
            var purchase = await _dbContext.Purchases.FindAsync(id);

            _dbContext.Purchases.Remove(purchase);

            await _dbContext.SaveChangesAsync();
        }