Ejemplo n.º 1
0
        internal Brick Create(Brick newBrick)
        {
            int id = _repo.Create(newBrick);

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