public IResult Add(Rental rentals) { if (rentals.ReturnDate == null && _rentalsDal.GetRentalDetails(I => I.CarId == rentals.CarId).Count > 0) { return(new ErrorResult("hata")); } _rentalsDal.Add(rentals); return(new SuccessResult(Messages.Added)); }
public IDataResult <List <RentalDetailDto> > GetRentalDetails() { return(new SuccessDataResult <List <RentalDetailDto> >(_rentalsDal.GetRentalDetails())); }
public IDataResult <List <RentalDetailsDto> > GetRentalDetails() { return(new SuccessDataResult <List <RentalDetailsDto> >(_rentalsDal.GetRentalDetails(), SuccessMessages.RentalListed)); }