Пример #1
0
        //[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));
        }
Пример #2
0
 public OperationDetails CreateOuterMemoryInterface(OuterMemoryInterface outerMemoryInterface)
 {
     Database.OuterMemoryInterfaces.Create(outerMemoryInterface);
     Database.Save();
     return(new OperationDetails(true, "Ok", ""));
 }