title: Xamarin.Android SQLite SQLiteConnection.Insert does not return inserted object's ID
body: <p>I'm very new to Xamarin and C# and trying to insert some sample data to my simple recipe database for testing purpourses.</p>
  
  <p>However, when inserting a new recipe, the <code>SQLiteConnection.Insert(data)</code> does not return the ID of the inserted record as it should (see <a href="https://stackoverflow.com/questions/5409751/get-generated-id-after-insert">here</a>), but instead returns <code>1</code> every time.</p>
  
  <p><strong>My insert data method:</strong></p>
  
  <pre><code>public static int insertUpdate(Object data) {
          string path = DB.pathToDatabase ();
          DB.createDatabase ();
          try {
              var db = new SQLiteConnection(path);
              int inserted = db.Insert(data);
              if (inserted != 0)
                  inserted = db.Update(data);
              return inserted;
          }
          catch (SQLiteException ex) {
              return -1;
          }
      }
  </code></pre>
  
  <p><strong>Inserting the sample data:</strong></p>
  
  <pre><code>        int stand = insertUpdate (new Recipe {
              Name = "Standard",
              Author = "Aeropress Nerd",
              Description = "The perfect recipe for your first cup",
              Type = "Default"
          });
  
  
          insertUpdate (new Step { Action = "Pour", Duration = 10, Recipe = stand });
          insertUpdate (new Step { Action = "Stir", Duration = 20, Recipe = stand });
          insertUpdate (new Step { Action = "Steep", Duration = 15, Recipe = stand });
  
          int inv = insertUpdate (new Recipe {
              Name = "Inverted",
              Author = "Aeropress Nerd",
              Description = "A more advanced brew using the inverted method.",
              Type = "Default"
          });
  </code></pre>
  
  <p>I cannot figure out what I am doing wrong. Thanks in advance for any help and sorry for the (probably) stupid question.</p>