public void TombstoneList(SqlCeOfflineEntity entity)
{
var list = (List)entity;
using (var connection = GetSqlCeConnection())
{
var transaction = connection.BeginTransaction();
try
{
using (var command = new SqlCeCommand())
{
command.Connection = connection;
command.CommandText = TOMBSTONE_TAGITEMMAPPING_FOR_LIST;
command.Parameters.Add("@ListID", SqlDbType.UniqueIdentifier).Value = list.ID;
command.ExecuteNonQuery();
}
using (var command = new SqlCeCommand())
{
command.Connection = connection;
command.CommandText = TOMBSTONE_ITEMS_FOR_LIST;
command.Parameters.Add("@ListID", SqlDbType.UniqueIdentifier).Value = list.ID;
command.ExecuteNonQuery();
}
using (var command = new SqlCeCommand())
{
command.Connection = connection;
command.CommandText = TOMBSTONE_LIST;
command.Parameters.Add("@ID", SqlDbType.UniqueIdentifier).Value = list.ID;
command.ExecuteNonQuery();
}
transaction.Commit();
}
catch (Exception)
{
transaction.Rollback();
throw;
}
}
}