public IHttpActionResult DeleteCategory(int id) { if (!_productServices.IsOwnerCategory(id, UserId)) { return(Content(HttpStatusCode.Forbidden, "This is not your category")); } _productServices.DeleteCategory(id); return(Ok(new { data = "OK" })); }