Beispiel #1
0
        public async Task <bool> DeleteByID(int id)
        {
            var invoice = await GetInvoiceByID(id);

            _InvoiceContext.Remove(invoice); //Change Tracker : only change the state
            var success = await _InvoiceContext.SaveChangesAsync();

            if (success == 0)
            {
                return(false);
            }
            return(true);
        }