//[ValidateAntiForgeryToken] public IActionResult Create(OuterMemoryFormFactorViewModel model) { var motherBoardFormFactor = new OuterMemoryFormFactor() { Name = model.Name }; var result = _motherBoardFormFactorService.CreateOuterMemoryFormFactor(motherBoardFormFactor); if (result.Succedeed) { return(Json(motherBoardFormFactor)); } return(Json(result)); }
//[ValidateAntiForgeryToken] public ActionResult Edit(OuterMemoryFormFactorViewModel model) { var motherBoardFormFactor = _motherBoardFormFactorService.GetOuterMemoryFormFactor(model.Id); if (motherBoardFormFactor == null) { return(NotFound()); } motherBoardFormFactor.Name = model.Name; var result = _motherBoardFormFactorService.UpdateOuterMemoryFormFactor(motherBoardFormFactor); if (result.Succedeed) { return(Json(motherBoardFormFactor)); } return(Json(result)); }