Example #1
0
        public IActionResult DeleteOfferRides(string offerID)
        {
            bool IsRidesDeleted = bookingRequest.DeleteOfferRides(offerID);

            if (IsRidesDeleted)
            {
                return(Ok());
            }
            else
            {
                return(BadRequest("Unable to delete rides"));
            }
        }
Example #2
0
 public bool RemoveRentalOffer(string rentalOfferId)
 {
     try
     {
         var rentalOffer = _context.RentalOffers.Where(s => s.RentalOfferID == rentalOfferId).FirstOrDefault();
         _context.Remove(rentalOffer);
         _context.SaveChanges();
         var IsSucess = bookingRequest.DeleteOfferRides(rentalOfferId);
         return(IsSucess);
     }
     catch (Exception e)
     {
         return(false);
     }
 }