public async Task <IActionResult> Delete(int paymentSheetDetailID)
        {
            try
            {
                _context.Remove(_context.PaymentSheetDetails.Find(paymentSheetDetailID));
                await _context.SaveChangesAsync();

                return(Ok());
            }
            catch (Exception e)
            {
                return(BadRequest(e));
            }
        }
Esempio n. 2
0
        public async Task <IActionResult> Delete(int userID)
        {
            try
            {
                _context.Remove(_context.Client.Find(userID));
                await _context.SaveChangesAsync();

                return(Ok());
            }
            catch (Exception e)
            {
                return(BadRequest(e));
            }
        }
Esempio n. 3
0
        public async Task <IActionResult> Delete(int CompanyID)
        {
            try
            {
                _context.Remove(_context.SubContractor.Find(CompanyID));
                await _context.SaveChangesAsync();

                return(Ok());
            }
            catch (Exception e)
            {
                return(BadRequest(e));
            }
        }