Ejemplo n.º 1
0
 public void Update(Market2Item user)
 {
     using (IDbConnection db = new SqlConnection(connectionString))
     {
         var sqlQuery = "UPDATE Market2TB SET Name = @Name, Description = @Description, ImgData = @ImgData WHERE Id = @Id";
         db.Execute(sqlQuery, user);
     }
 }
Ejemplo n.º 2
0
 public void Create(Market2Item item)
 {
     using (IDbConnection db = new SqlConnection(connectionString))
     {
         var sqlQuery = "INSERT INTO Market2TB (Name, Description, ImgData, Discount) VALUES(@Name, @Description, @ImgData, @Discount)";
         db.Execute(sqlQuery, item);
     }
 }