lundi 8 juin 2015

Why my Linq Querry against SQLite does not return all table field values

I ma building a WinRT application with SQLite.

I am running the following method within my c# code in order to retrive all field from given table ProductSubCtaegory which have equal Parent ID

I ma using latest version of SQLite.Net and SQLITE.NET.ASycn

public async Task<IEnumerable<ProductSubCategory>> GetProductSubCategoryAsync(int ParentCategoryId)
   {
       List<ProductSubCategory> lst = new List<ProductSubCategory>();
       var DBconn = await _sqliteService.OpenSQLiteConnection();
       {
           //retrive test data
           lst = await DBconn.Table<ProductSubCategory>().Where(c=>c.ParentSubCategoryId==ParentCategoryId).ToListAsync();

       }
       return lst;
   }

When the code execute it returns the correct amount of records based on the filter but not all return field value gets retunrs.

For instance all my table field of type INT as well as primary key is not updated in my object

Any reason for that and solution to get it to work ? I need to retrive all those columnd data

Thnaks for help regard serge

Aucun commentaire:

Enregistrer un commentaire