public IActionResult Delete(Rentals rentals)
 {
     var result = _rentalService.Delete(rentals);
     if (result.Success)
     {
         return Ok(result);
     }
     return BadRequest(result);
 }
Exemplo n.º 2
0
        public IActionResult Update(Rentals rent)
        {
            var result = _rentalsService.Update(rent);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result));
        }
Exemplo n.º 3
0
        public IActionResult Add(Rentals rentals)
        {
            var result = _rentalsService.Add(rentals);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result));
        }
Exemplo n.º 4
0
        public IActionResult Delete(Rentals rental)
        {
            var res = _rentalService.Delete(rental);

            if (res.Success)
            {
                return(Ok(res));
            }
            return(BadRequest(res));
        }
Exemplo n.º 5
0
        public IActionResult Delete(Rentals rentals)
        {
            var result = _rentalsService.Delete(rentals);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result.Message));
        }
Exemplo n.º 6
0
        public IActionResult Update(Rentals rental, int id)
        {
            var result = _rentalService.Update(rental, id);

            if (result.Success)
            {
                return(Ok(result));
            }
            else
            {
                return(BadRequest(result));
            }
        }