Пример #1
0
 public IResult Add(Rental rental)
 {
     if (FindeksCheck(rental))
     {
         if (IsRentCheck(rental))
         {
             _rentalDal.Add(rental);
             _customerService.AddFindeksScore(rental.CustomerId, rental.CarId);
             return(new SuccessResult(Messages.RentalAdded));
         }
         else
         {
             return(new ErrorResult(Messages.RentalAddedError));
         }
     }
     else
     {
         return(new ErrorResult(Messages.FindeksError));
     }
 }