public Carrito DeleteCarrito(CarritoDTOs carrito) { var entity = new Carrito { CarritoID = carrito.CarritoID }; _repository.Delete <Carrito>(entity); return(entity); }
public Carrito CreateCarrito(CarritoDTOs carrito) { var entity = new Carrito { ClienteID = carrito.ClienteID }; _repository.Add <Carrito>(entity); return(entity); }
public IActionResult Delete(CarritoDTOs carrito) { try { return(new JsonResult(_service.DeleteCarrito(carrito)) { StatusCode = 201 }); } catch (Exception e) { return(BadRequest(e.Message)); } }
public Carrito Delete(CarritoDTOs carrito) { return(_service.DeleteCarrito(carrito)); }
public Carrito Post(CarritoDTOs carrito) { return(_service.CreateCarrito(carrito)); }