//[ValidateAntiForgeryToken] public IActionResult Create(PowerSupplyMotherBoardInterfaceViewModel model) { var powerSupplyMotherBoardInterface = new PowerSupplyMotherBoardInterface() { Name = model.Name }; var result = _powerSupplyMotherBoardInterfaceService.CreatePowerSupplyMotherBoardInterface(powerSupplyMotherBoardInterface); if (result.Succedeed) { return(Json(powerSupplyMotherBoardInterface)); } return(Json(result)); }
//[ValidateAntiForgeryToken] public ActionResult Edit(PowerSupplyMotherBoardInterfaceViewModel model) { var powerSupplyMotherBoardInterface = _powerSupplyMotherBoardInterfaceService.GetPowerSupplyMotherBoardInterface(model.Id); if (powerSupplyMotherBoardInterface == null) { return(NotFound()); } powerSupplyMotherBoardInterface.Name = model.Name; var result = _powerSupplyMotherBoardInterfaceService.UpdatePowerSupplyMotherBoardInterface(powerSupplyMotherBoardInterface); if (result.Succedeed) { return(Json(powerSupplyMotherBoardInterface)); } return(Json(result)); }