public List<Priority> GetAllPriority()
{
var priorities = new List<Priority>();
using (var command = new SqlCeCommand())
{
command.Connection = GetSqlCeConnection();
command.CommandText = GET_ALL_PRIORITY;
SqlCeDataReader reader = command.ExecuteReader();
while (reader.Read())
{
var p = new Priority()
{
ID = (int)reader["ID"],
Name = reader["Name"] as string,
ServiceMetadata = new OfflineEntityMetadata()
{
IsTombstone = false,
Id = reader["_MetadataID"] as string
}
};
priorities.Add(p);
}
}
return priorities;
}