public void AddStatus(Status entity) { base.AddItem<Status>(entity); }
public void DeleteStatus(Status entity) { base.DeleteItem<Status>(entity); }
public List<Status> GetAllStatus() { var statuses = new List<Status>(); using (var command = new SqlCeCommand()) { command.Connection = GetSqlCeConnection(); command.CommandText = GET_ALL_STATUS; SqlCeDataReader reader = command.ExecuteReader(); while (reader.Read()) { var p = new Status { ID = (int) reader["ID"], Name = reader["Name"] as string, ServiceMetadata = new OfflineEntityMetadata() { IsTombstone = false, Id = reader["_MetadataID"] as string } }; statuses.Add(p); } } return statuses; }