Feb 23, 2011 at 10:32 PM
Edited Feb 23, 2011 at 10:43 PM
Similar to the rewards sample, I am attempting to add in properties to the ContentRewardProgramsRecord. Mine is called ContentBeltProgramsRecord.
My properties are not being saved and I debugged it to be this foreach statement in the Service:
foreach (var contentBeltProgramRecord in oldBelts)
lookupNew[contentBeltProgramRecord.BeltRecord] = true;
var beltRecord = model.Where(r => r.BeltRecord.Id == contentBeltProgramRecord.BeltRecord.Id).First();
numOfStripes = beltRecord.NumberOfStripes ?? 0;
beltOrder = beltRecord.BeltOrder ?? 0;
This if statement never evaluates to true:
lookupNew is returning a BeltRecord.
contentBeltProgramRecord.BeltRecord is a BeltRecordProxyblahblahblah. Is this true? Should it be a proxy. I know that, in a sense, it truly is a proxy of the BeltRecord, but I am assuming
that if the ContainsKey is to evaluate as true. It should be a BeltRecord. Am I miss understanding this if statement?
One thing I am missing in my db, when a BeltsRecord is created, which is a IList<ContentBeltProgramsRecord>, my BeltRecord_Id is not inserted into the db.
Since I am building a relation to ContentItems, like in the Sponsor Sample. How the heck do you create a list of LazyField<IContent> for the BeltsRecord?