Open();
SQLiteCommand cmd = db.CreateCommand(statement);
cmd.ExecuteNonQuery();
}
catch (SQLiteException ex)
{
System.Diagnostics.Debug.WriteLine("Deletion failed: " + ex.Message);
throw ex;
}
}
//Query operation
public List SelectList(String statement) where T : new()
{
Open();
SQLiteCommand cmd = db.CreateCommand(statement);
var lst = cmd.ExecuteQuery();
return lst.ToList();
}
public ObservableCollection SelectObservableCollection(String statement)
where T : new()
{
List lst = SelectList(statement);
ObservableCollection oc = new ObservableCollection();
foreach (T item in lst)
{
oc.Add(item);
}
return oc;
}
private void CopyFromContentToStorage(String assemblyName,String dbName)
{
IsolatedStorageFile store =
IsolatedStorageFile.GetUserStoreForApplication();
System.IO.Stream src =
Application.GetResourceStream(
new Uri("/" + assemblyName + ";component/" + dbName,
SQLiteCommand cmd = db.CreateCommand(statement);
cmd.ExecuteNonQuery();
}
catch (SQLiteException ex)
{
System.Diagnostics.Debug.WriteLine("Deletion failed: " + ex.Message);
throw ex;
}
}
//Query operation
public List SelectList(String statement) where T : new()
{
Open();
SQLiteCommand cmd = db.CreateCommand(statement);
var lst = cmd.ExecuteQuery();
return lst.ToList();
}
public ObservableCollection SelectObservableCollection(String statement)
where T : new()
{
List lst = SelectList(statement);
ObservableCollection oc = new ObservableCollection();
foreach (T item in lst)
{
oc.Add(item);
}
return oc;
}
private void CopyFromContentToStorage(String assemblyName,String dbName)
{
IsolatedStorageFile store =
IsolatedStorageFile.GetUserStoreForApplication();
System.IO.Stream src =
Application.GetResourceStream(
new Uri("/" + assemblyName + ";component/" + dbName,