예제 #1
0
 public void Update(Market1Item user)
 {
     using (IDbConnection db = new SqlConnection(connectionString))
     {
         var sqlQuery = "UPDATE Market1TB SET Name = @Name, Description = @Description, ImgData = @ImgData WHERE Id = @Id";
         db.Execute(sqlQuery, user);
     }
 }
예제 #2
0
 public void Create(Market1Item item)
 {
     using (IDbConnection db = new SqlConnection(connectionString))
     {
         var sqlQuery = "INSERT INTO Market1TB (Name, Description, ImgData) VALUES(@Name, @Description, @ImgData)";
         db.Execute(sqlQuery, item);
     }
 }