private IResult CheckRentalsForCustomers(int customerId)
        {
            if (_dal.CheckRentalsForCustomers(customerId))
            {
                return(new ErrorResult());
            }

            return(new SuccessResult());
        }
        public IResult Delete(Customer entity)
        {
            try
            {
                bool result = _dal.CheckRentalsForCustomers(entity);
                if (!result)
                {
                    _dal.Delete(entity);
                    return(new SuccessResult(Messages.Deleted));
                }

                return(new ErrorResult(Messages.CustomerorUserDeleteError));
            }
            catch (Exception e)
            {
                return(new ErrorResult(Messages.Error + e.Message));
            }
        }