Hi,
I retrieve news items for a project by using this code:
ProjectEntity project = new ProjectEntity(projectID);
EntityCollection<NewsEntity> newsItems = project.NewsItems;
using (DataAccessAdapter adapter = new DataAccessAdapter())
{
adapter.FetchEntityCollection(newsItems, project.GetRelationInfoNewsItems());
}
newsItems.Sort((int)NewsFieldIndex.PublishedDate, ListSortDirection.Descending);
return newsItems;
I bind this collection newsItems to a llblgenDatasource. I update a newsitem in the datasource. When I click on update, it tries to update the project table also. I think it has to do with that I am using the project entity as the start entity, so am I doing this wrong? Should I use a normal predicateexpressions to retrieve the newsitems then? For this code seemed so simple to use
I am using the uow for update, this code:
public static void PersistNewsUnitOfWork(UnitOfWork2 uow)
{
using (DataAccessAdapter adapter = new DataAccessAdapter())
{
uow.Commit(adapter, true);
}
}
Best regards,