Beispiel #1
0
 public static void CreateTable(SQLiteConnection connection)
 {
     using (SQLiteCommand command = connection.CreateCommand())
     {
         DBFixtureUnitCommands.CreateTable(command);
         command.ExecuteNonQuery();
     }
 }
Beispiel #2
0
 public static long UpdateRow(SQLiteConnection connection, FixtureUnitModel model)
 {
     using (SQLiteCommand command = connection.CreateCommand())
     {
         DBFixtureUnitCommands.UpdateRow(model, command);
         long check = command.ExecuteNonQuery();
         return(check);
     }
 }
Beispiel #3
0
 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.");
     }
 }