예제 #1
0
        public void DeleteCustomerLedger(int customerLedgerId)
        {
            var customer = _context.CustomerLedgers.FirstOrDefault(cl => cl.Id == customerLedgerId);

            _context.CustomerLedgers.Remove(customer);
            _context.SaveChanges();
        }
        public void DeleteCustomer(int CustomerId)
        {
            var customer = _context.CustomerMasters
                           .FirstOrDefault(c => c.Id == CustomerId);

            if (customer != null)
            {
                _context.CustomerMasters.Remove(customer);
            }
            _context.SaveChanges();
        }