public void DeleteProductCategoryFromDb([FromBody]DeleteProductByIDObjectBinder product) { _unitOfWork.ProductCategoryRepository.DeleteItem(product.Id); _unitOfWork.ProductRepository.DeleteItem(GetProducts().SingleOrDefault(x => x.ProductCategoryId == product.Id).Id); _unitOfWork.Save(); }
public void DeleteProductFromDb([FromBody] DeleteProductByIDObjectBinder product) { _unitOfWork.ProductRepository.DeleteItem(product.Id); _unitOfWork.Save(); }