public bool TagExists(SqlCeOfflineEntity entity)
{
var tag = (Tag) entity;
using (var command = new SqlCeCommand())
{
command.Connection = GetSqlCeConnection();
command.CommandText = GET_TAG;
command.Parameters.Add("@ID", SqlDbType.Int).Value = tag.ID;
object result = command.ExecuteScalar();
return result != null;
}
}