public IActionResult DeleteCashier(int id)
 {
     if (_cashierRepository.DeleteCashier(id))
     {
         return(Ok());
     }
     return(BadRequest());
 }
Example #2
0
        public IActionResult DeleteCashier(int id)
        {
            var cashier = _cashierRepository.FindCashierById(id);

            if (cashier == null)
            {
                return(NotFound());
            }

            _cashierRepository.DeleteCashier(cashier);
            return(Ok());
        }