Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public ActionResult <WebbingGrip> Post([FromBody] WebbingGrip newWebbingGrip)
 {
     try
     {
         return(Ok(_wgs.Create(newWebbingGrip)));
     }
     catch (Exception err)
     {
         return(BadRequest(err.Message));
     }
 }
Ejemplo n.º 3
0
 public WebbingGrip Create(WebbingGrip newWebbingGrip)
 {
     return(_repo.Create(newWebbingGrip));
 }