Example #1
0
        internal Brick Create(Brick newBrick)
        {
            int id = _repo.Create(newBrick);

            newBrick.Id = id;
            return(newBrick);
        }
Example #2
0
 public ActionResult <IEnumerable <Brick> > Post([FromBody] Brick data)
 {
     try
     {
         return(Ok(_br.Create(data)));
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }
Example #3
0
 public ActionResult <Brick> Post([FromBody] Brick value)
 {
     try
     {
         return(Ok(_repo.Create(value)));
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }