public void CacheIdentity(string key, string identity)
{
string query = "INSERT INTO kvstore(key,value) values ( @key , @value )";
try
{
connection = new SqliteConnection("URI=file:" + filePath);
connection.Open();
using (var command = connection.CreateCommand())
{
command.CommandText = query;
BindData(command, key, identity);
command.ExecuteNonQuery();
}
}
finally
{
if (connection != null)
{
connection.Close();
connection.Dispose();
}
}
}