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