Example #1
0
        internal Brick Get(int Id)
        {
            Brick exists = _repo.GetById(Id);

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