public static void CreateTable(SQLiteConnection connection) { using (SQLiteCommand command = connection.CreateCommand()) { DBFixtureUnitCommands.CreateTable(command); command.ExecuteNonQuery(); } }
public static long UpdateRow(SQLiteConnection connection, FixtureUnitModel model) { using (SQLiteCommand command = connection.CreateCommand()) { DBFixtureUnitCommands.UpdateRow(model, command); long check = command.ExecuteNonQuery(); return(check); } }
public static long InsertRow(SQLiteConnection connection, ref FixtureUnitModel model) { using (SQLiteCommand command = connection.CreateCommand()) { DBFixtureUnitCommands.InsertRow(model, command); long check = command.ExecuteNonQuery(); if (check == 1) { model.ID = connection.LastInsertRowId; return(model.ID); } throw new Exception("DBFixture_Unit -> InserRow -> insertRowNotSuccessful."); } }