Ejemplo n.º 1
0
        internal Brick Get(int Id)
        {
            Brick exists = _repo.GetById(Id);

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