public async Task <BaseResponse <bool> > DeleteSale(int idSale)
        {
            BaseResponse <bool> res = new BaseResponse <bool>();

            res.response = await _salesRepository.DeleteSale(idSale);

            res.msg = "Se eliminó la venta con exito!";
            return(res);
        }
        public bool DeleteSale(int id)
        {
            var sale = _context.GetSaleByID(id);

            if (sale == null)
            {
                return(false);
            }


            try
            {
                _context.DeleteSale(sale.SaleID);
            }
            catch (DbException e)
            {
                //TODO Add logging
                return(false);
            }
            return(true);
        }