Example #1
0
 public static void CreateTable(SQLiteConnection connection)
 {
     using (SQLiteCommand command = connection.CreateCommand())
     {
         DBFixtureUnitCommands.CreateTable(command);
         command.ExecuteNonQuery();
     }
 }
Example #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);
     }
 }
Example #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.");
     }
 }