Greetings,
This may just be a Rocky question, but we are utilizing the CSLA CodeSmith templates (RC1.1.0) with CSLA 2.1.4 to generate our core objects. One of the challenges we have is whenever the generated code attempts to load a root object from list (whether editable or read only), it does so utilizing a call get Get<BusinessObject>(SafeDataReader dr) - the issue is that this method does not exist (e.g. is not generated with the templates)!
Therefore, my question is this: should we modify the templates to include this method for root objects, or is there a good reason that the framework omits this? We want to be certain we adhere as close to the core of the framework as possible.
Disclaimer: I have not traversed every chapter in the book; thus, I may be asking a very silly question here.
Thanks in advance!
I intended this question to be more along the lines of "is there any reason according to the framework that a root object should be treated differently than that of a child object when dealing with lists?"; I never really cared about the data source subject - my bad for including it in the post. I think the overall answer here is the usual "yes and no; it depends on your implementation" - I was hoping instead that the framework would provide some hard-line guidance in this matter.
Thanks for your posts.
Page 87 of the eBook is titled:
Altering the EditableRoot Template
This change is required to support a new type of BO named:
EditableRootListBase
If you don't plan to use ERL then you do not need to modify the ER template.
So if you want to modify the template you should make it conditional - SupportsERL (T/F).
Joe
Copyright (c) Marimer LLC