I'm writing a shopping cart and have the following structure: ProductPart/Record that has a price, and a ShoppingCartPart/Record that has a number of ProductParts. I've got a link table and this is pretty much as per the 1-many/many-many tutorial.
My issue is that I'd like to create the ShoppingCartPart in the code dynamically for each user. I can create the record using the repository, but it doesn't seem to create the part correctly. I haven't found a way to create a part though.I think it's just
a syntax issue :) Any help or pointers is very much appreciated!
I have also tried to create a ShoppingCart type and then use IContentManager.Create("ShoppingCart").As<ShoppingCartPart>(), but this always returns null. If I leave off the .As<> and inspect the result in the debugger the ContentItem
returned is a ShoppingCart and has a ShoppingCartPart. Why is the .As<> not working? Again, any help/pointers are appreciated!