Пример #1
0
        public JsonResult ChangeStatus(Guid id)
        {
            var result = _productCategoryService.ChangeStatus(id);

            return(Json(new
            {
                status = result
            }));
        }
Пример #2
0
 public HttpResponseMessage ChangeStatus(HttpRequestMessage request, int id) //id trong Models.EF.User truyền kiểu gì thì truyền y như vậy
 {
     return(CreateHttpResponse(request, () =>
     {
         HttpResponseMessage response = null;
         var result = _productCategoryService.ChangeStatus(id);
         response = request.CreateResponse(HttpStatusCode.OK, result);
         _productCategoryService.Save();
         return response;
     }));
 }