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); }
public ActionResult <Webbing> Post([FromBody] Webbing newWebbing) { try { return(Ok(_ws.Create(newWebbing))); } catch (Exception err) { return(BadRequest(err.Message)); } }
public Webbing Create(Webbing newWebbing) { return(_repo.Create(newWebbing)); }