public HttpResponseMessage DeleteEntitiy(CompanyChartViewModel CompanyChart) { if (ModelState.IsValid) { SetViewModel(CompanyChart); var deleteAccount = _companyChartService.Delete(CompanyChart.GetModel()); return(Request.CreateResponse(HttpStatusCode.OK, CompanyChart)); } return(Request.CreateResponse(HttpStatusCode.NotFound)); }
public JsonResult Delete(int selectedNodeId) { _CompanyChartService.Delete(selectedNodeId, HttpContext.User.Identity.Name); return(Json(new { id = selectedNodeId })); }