Beispiel #1
0
        public ActionResult DeleteCategory(int?id)
        {
            if (id == null)
            {
                return(ErrorResponse("categoryId missing"));
            }

            string error;

            var isDeleted = _webStoreServices.DeleteCategory((int)id, out error);

            return(Json(new JsonResponseToken
            {
                success = isDeleted
                , result = new { id }
                , error = error
            }));
        }