Пример #1
0
        static void Main(string[] args)
        {
            /*******************************************************
            *  NOTE: YOU MUST CREATE A DATABASE NAMED "dbtest" MANUALLY
            *  InitDatabase() SHOULD DO THE REST
            *******************************************************/

            _config = new Configurator("Private.config");
            _db.ConnectionString = _config.ConnectionString;

            InitDatabase(true);
            InitTables();
            FillTables(true);

            PrintTable(_tblStyles);
            PrintTable(_tblComposers);

            Console.WriteLine("Filling dataset");


            return;

            var table = _db.AddTable <TableStyles>();

            _db.TransactionBegin();
            _db.Fill();

            PrintTable(table);

            //table.DeleteRow(table.Rows.Last());

            var row = table.NewRow();

            row.Name   = "test2";
            row.Weight = -1;
            table.AddRow(row);
            table.DeleteRow(table.Rows.Last());
            table.Rows.Last().Name = "xxx";

            //var row = table.NewRow();
            //row.Name = "test2";
            //row.Weight = -1;
            //table.AddRow(row);
            //db.Update();

            _db.Update();
            _db.Fill();

            _db.TransactionCommit();

            PrintTable(table);
        }