示例#1
0
 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));
 }
示例#2
0
 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));
 }