Otis wrote:
no that's currently not supported (also not planned for v3), you need projections for that or use the calls generated.
Too bad it's not supported. Would make things a lot easier. Currently I've the following code but there must be an easier way to do this:
UmbracoProductCollection umbracoProductCollection = new UmbracoProductCollection();
using (IRetrievalQuery query = RetrievalProcedures.GetSpDigiGetRecursiveUmbracoProductsCallAsQuery(productGroupCode))
{
TypedListDAO dao = new TypedListDAO();
using (IDataReader reader = dao.GetAsDataReader(null, query, CommandBehavior.CloseConnection))
{
List<IDataValueProjector> valueProjectors = new List<IDataValueProjector>();
valueProjectors.Add(new DataValueProjector(UmbracoProductFieldIndex.UmbracoProductId.ToString(), 0, typeof(Guid)));
valueProjectors.Add(new DataValueProjector(UmbracoProductFieldIndex.FirstProductName.ToString(), 1, typeof(string)));
DataProjectorToIEntityCollection projector = new DataProjectorToIEntityCollection(umbracoProductCollection);
dao.GetAsProjection(valueProjectors, projector, reader);
}
}