//[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));
        }
コード例 #2
0
 public OperationDetails CreatePowerSupplyMotherBoardInterface(PowerSupplyMotherBoardInterface powerSupplyMotherBoardInterface)
 {
     Database.PowerSupplyMotherBoardInterfaces.Create(powerSupplyMotherBoardInterface);
     Database.Save();
     return(new OperationDetails(true, "Ok", ""));
 }