I am new to Xamarin forms, so I know very little about sqlite in xamarin
I was implementing DatabaseHelper class
public DatabaseHelper(string dbPath)
{
database = new SQLiteAsyncConnection(dbPath);
database.CreateTableAsync<Product>();
}
public Task<List<Product>> GetProductListAsync()
{
return database.Table<Product>().ToListAsync();
}
public Task<int> SaveProductListAsync(List<Product> products)
{
return database.InsertAllAsync(products);
}
Product Model class is :
public class Product
{
public long ProductID { get; set; }
public String ProductCode { get; set; }
public String ProductName { get; set; }
public long BrandID { get; set; }
public String Brand { get; set; }
public String Barcode { get; set; }
}
How can i get the maximum ProductID in Product table ?