internal Brick Get(int Id) { Brick exists = _repo.GetById(Id); if (exists == null) { throw new Exception("Invalid Brick my dude"); } return(exists); }
public ActionResult <Brick> Get(int id) { try { return(Ok(_br.GetById(id))); } catch (Exception e) { return(BadRequest(e)); } }