public WebbingGrip Create(WebbingGrip newWebbingGrip) { string sql = @"INSERT INTO WebbingGrips (manufacturerId, name, manufacturer, img, componentType, material, weight, wll, mbs, commonSlipThreshold, connectionType, compatibleWebbingWidth, price) VALUE (@manufacturerId, @name, @manufacturer, @img, @componentType, @material, @weight, @wll, @mbs, @commonSlipThreshold, @connectionType, @compatibleWebbingWidth, @price) "; newWebbingGrip.Id = _db.ExecuteScalar <int>(sql, newWebbingGrip); return(newWebbingGrip); }
public ActionResult <WebbingGrip> Post([FromBody] WebbingGrip newWebbingGrip) { try { return(Ok(_wgs.Create(newWebbingGrip))); } catch (Exception err) { return(BadRequest(err.Message)); } }
public WebbingGrip Create(WebbingGrip newWebbingGrip) { return(_repo.Create(newWebbingGrip)); }