title: Saving and reading Picker values from SQLite - Xamarin.Forms
body: <p>I would like you to help me solve a problem that I can not deal with.</p>
  
  <p>In my Xamarin.Forms application, the user can add to the SQLite database:</p>
  
  <pre><code>public class Car
      {
          [PrimaryKey, AutoIncrement]
          public int ID { get; set; }
          public string Text { get; set; }
          public int PickerValue { get; set; }
      }
  </code></pre>
  
  <p>PickerValue is of type INT because I think that the selected value of the picker gives the index INT value. Am I wrong?</p>
  
  <p>The user adds item using:</p>
  
  <pre><code>&lt;Editor Placeholder="Enter name" Text="{Binding Text}" /&gt;
  &lt;Picker x:Name="myPicker" Title="Value:"&gt;
              &lt;Picker.ItemsSource&gt;
                  &lt;x:Array Type="{x:Type x:String}"&gt;
                      &lt;x:String&gt;value 1&lt;/x:String&gt;
                      &lt;x:String&gt;value 2&lt;/x:String&gt;
                  &lt;/x:Array&gt;
              &lt;/Picker.ItemsSource&gt;
          &lt;/Picker&gt;
  </code></pre>
  
  <p>On another page, items are displayed using ListView:</p>
  
  <pre><code>&lt;Label Text="{Binding Text}"/&gt;
  &lt;Label Text="{Binding PickerValue}"/&gt;
  </code></pre>
  
  <p>When I select an item on the ListView - the edit page opens for me - the same page in which I added new products (code above) with filled fields from the database. I can edit them there.</p>
  
  <p>I would like to be able to save the selected Picker value to SQLite, and on another page I can display it (or index of the selected value). Can someone help me how to make such a binding?</p>
  
  <p>If it is possible - I would like to do it in XAML.</p>
  
  <p>I made the project based on: <a href="https://docs.microsoft.com/pl-pl/xamarin/get-started/quickstarts/database?pivots=windows" rel="nofollow noreferrer">https://docs.microsoft.com/pl-pl/xamarin/get-started/quickstarts/database?pivots=windows</a></p>