Ejemplo n.º 1
0
        public bool AddRow(string tableName, ProductItem item)
        {
            var cmd = new SQLiteCommand(myConnection);

            cmd.CommandText = $"INSERT INTO {tableName}(name, price, quantity) VALUES('{item.GetName()}',{item.GetPrice()},{item.GetQuantity()})";

            return(cmd.ExecuteNonQuery() != 0);
        }