public ActionResult <bool> DeleteLaptop(int LaptopId) { bool Result = _laptopService.DeleteLaptop(LaptopId); if (Result) { return(Ok()); } return(NotFound(LaptopId)); }
public async Task <IActionResult> DeleteLaptop(string id) { try { await laptopService.DeleteLaptop(id); return(Ok()); } catch (Exception ex) { return(BadRequest(ex.Message)); } }