public ActionResult DeleteConfirmed(int id)
        {
            //AFTER

            _ProductSizeService.Delete(id);
            _unitOfWork.Save();

            return(RedirectToAction("Index").Success("Data deleted successfully"));
        }
        public ActionResult <ProductSize> Delete(int id)
        {
            ProductSize deletedProductSize = _productSizeService.Delete(id);

            if (deletedProductSize == null)
            {
                return(NotFound($"Did not find ProductSize with ID: {id}"));
            }
            return(Ok(deletedProductSize));
        }
Exemplo n.º 3
0
 public IActionResult Delete(int id)
 {
     _productSizeService.Delete(id);
     return(StatusCode((int)HttpStatusCode.NoContent));
 }