Question about CodeSmith templates EditableRootList and EditableChild

Question about CodeSmith templates EditableRootList and EditableChild

Old forum URL: forums.lhotka.net/forums/t/902.aspx


DanEssin posted on Monday, August 14, 2006

    EditableChild is expecting to be called with the connection and the parent ref as in:
        internal void Update(SqlConnection cn, ResultDefList parent)

The EditableRootList is only passing the connection:
                foreach (ResultDefItem child in this)
                {
                    if (child.IsNew)
                        child.Insert(cn);
                    else
                        child.Update(cn);
                }


Is this an error or am I using it incorrectly?

Thanks.

rasupit replied on Monday, August 14, 2006

I have to admit, searching for an anwer before posting sometime can be overwhelming when you have too many place to post questions.  Now that the workspace has finally moved to CslaContrib hopefully everybody can post codesmith template related post at http://forums.lhotka.net/forums/8/ShowForum.aspx to make it easier for others to search.

For your scenario, you would not define a parent on EditableChild.

Other similar posts can be found:

http://www.gotdotnet.com/workspaces/messageboard/thread.aspx?id=8aaa6bc5-40c7-4441-bae1-a1e4b076865a&threadid=f53deda4-215f-4af3-8e12-78f7f85cd67f

http://community.codesmithtools.com/forums/thread/16339.aspx

Ricky

DanEssin replied on Wednesday, August 23, 2006

Thanks

rasupit wrote:

I have to admit, searching for an anwer before posting sometime can be overwhelming when you have too many place to post questions.  Now that the workspace has finally moved to CslaContrib hopefully everybody can post codesmith template related post at http://forums.lhotka.net/forums/8/ShowForum.aspx to make it easier for others to search.

For your scenario, you would not define a parent on EditableChild.

Other similar posts can be found:

http://www.gotdotnet.com/workspaces/messageboard/thread.aspx?id=8aaa6bc5-40c7-4441-bae1-a1e4b076865a&threadid=f53deda4-215f-4af3-8e12-78f7f85cd67f

http://community.codesmithtools.com/forums/thread/16339.aspx

Ricky




Copyright (c) Marimer LLC