public ActionResult <Burger> Create([FromBody] Burger newBurger) // req.body { try { return(Ok(_service.Create(newBurger))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public ActionResult <Burger> Create([FromBody] Burger newBurger) { try { return(Ok(_bs.Create(newBurger))); } catch (System.Exception err) { return(BadRequest(err)); } }
public ActionResult <Burger> Create([FromBody] Burger burger) { try { return(Ok(_bs.Create(burger))); } catch (System.Exception e) { return(BadRequest(e.Message)); } }