Ejemplo n.º 1
0
        public IResult CheckReturnDate(int rentalsId)
        {
            var result = _rentalsDal.GetCarRentalDetails(r => r.RentalsId == rentalsId && r.ReturnDate == null);

            if (result.RentalsId > 0)
            {
                return(new ErrorResult(Messages.RentalsAddedError));
            }
            return(new SuccessResult(Messages.RentalsAdded));
        }