Forum Xamarin Xamarin.Forms

Linq and change Label text

DeviC3DeviC3 Member ✭✭

Hi I'm trying to write code to change Label text after succesful barcode scanning. Code below:

    void SearchBarcodeFromDB()
        using (SQLiteConnection conn = new SQLiteConnection(App.dbPath))
            var dbList = conn.Table<Products>().ToList();

            var row = from x in dbList
                      where x.Barcode == barcodeResult
                      select x.Product;

            resultDB_LBL.Text = row;


I used SingleOrDefault(), Single(), ToString() with no result
Can someone help me with this?


Best Answer


  • DeviC3DeviC3 Member ✭✭
    edited July 2019

    Ok, I modified code and it works.
    Thanks @LandLu

Sign In or Register to comment.