示例#1
0
 public IActionResult AddLaptop(LaptopModel laptopModel)
 {
     try
     {
         laptopService.AddLaptop(laptopModel);
         laptopService.Save();
     }
     catch (Exception e)
     {
         return(BadRequest(laptopModel + e.Message));
     }
     return(Ok(laptopModel));
 }