//[ValidateAntiForgeryToken] public IActionResult Create(OuterMemoryInterfaceViewModel model) { var motherBoardInterface = new OuterMemoryInterface() { Name = model.Name }; var result = _motherBoardInterfaceService.CreateOuterMemoryInterface(motherBoardInterface); if (result.Succedeed) { return(Json(motherBoardInterface)); } return(Json(result)); }
//[ValidateAntiForgeryToken] public ActionResult Edit(OuterMemoryInterfaceViewModel model) { var motherBoardInterface = _motherBoardInterfaceService.GetOuterMemoryInterface(model.Id); if (motherBoardInterface == null) { return(NotFound()); } motherBoardInterface.Name = model.Name; var result = _motherBoardInterfaceService.UpdateOuterMemoryInterface(motherBoardInterface); if (result.Succedeed) { return(Json(motherBoardInterface)); } return(Json(result)); }