Beispiel #1
0
 public static void CreateTable(SQLiteConnection connection)
 {
     using (SQLiteCommand command = connection.CreateCommand())
     {
         DBMatrix3dCommands.CreateTable(command);
         command.ExecuteNonQuery();
     }
 }
Beispiel #2
0
 public static long Update(SQLiteConnection connection, Matrix3dModel model)
 {
     using (SQLiteCommand command = connection.CreateCommand())
     {
         DBMatrix3dCommands.Update(command, model);
         long check = command.ExecuteNonQuery();
         if (check == 1)
         {
             return(connection.LastInsertRowId);
         }
         else if (check == 0)
         {
             //throw new Exception("DBMatrix3d -> Update -> No Row Is Update.");
         }
         throw new Exception("DBMatrix3d -> Update -> Update Is Not Successful.");
     }
 }
Beispiel #3
0
 public static long Insert(SQLiteConnection connection, ref Matrix3dModel model)
 {
     using (SQLiteCommand command = connection.CreateCommand())
     {
         DBMatrix3dCommands.Insert(command, model);
         long check = command.ExecuteNonQuery();
         if (check == 1)
         {
             model.ID = connection.LastInsertRowId;
             return(model.ID);
         }
         else if (check == 0)
         {
             throw new Exception("DBMatrix3d -> Insert -> No Row Is Inserted.");
         }
         throw new Exception("DBMatrix3d -> Insert -> Insert Is Not Successful.");
     }
 }