Exemplo n.º 1
0
        internal Webbing Create(Webbing newWebbing)
        {
            string sql = @"INSERT INTO Webbings (manufacturerId, name, manufacturer, componentType, img, material, width, weight, wll, mbs, thickness, elongation) VALUE (@manufacturerId, @name, @manufacturer, @componentType, @img, @material, @width, @weight, @wll, @mbs, @thickness, @elongation)";

            newWebbing.Id = _db.ExecuteScalar <int>(sql, newWebbing);
            return(newWebbing);
        }
Exemplo n.º 2
0
 public ActionResult <Webbing> Post([FromBody] Webbing newWebbing)
 {
     try
     {
         return(Ok(_ws.Create(newWebbing)));
     }
     catch (Exception err)
     {
         return(BadRequest(err.Message));
     }
 }
Exemplo n.º 3
0
 public Webbing Create(Webbing newWebbing)
 {
     return(_repo.Create(newWebbing));
 }