EditableSwitchable compilation problem

EditableSwitchable compilation problem

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


sukhorukov posted on Wednesday, January 17, 2007

Hi,

 

I am currently using xml and CodeSmith templates (Version: 1.1.0 RC) for CSLA code generation with SplitBase generation method.

 

My BO model:

 

  1. EditableRoot (Person) as parent for EditableSwitchable (PersonResidence)
  2. EditableSwitchable object have tag: <Relationship Parent="Person" /> (because I need foreign key (PersonID) for PersonResidence insert/update operations)

 

When I compile source code (output from CodeSmith) I get next errors in PersonResidence.Base.cs:

 

1. The type arguments for method 'IISU20.Common.Library.PersonResidenceBase<T>.ExecuteInsert<P>(System.Data.SqlClient.SqlConnection, P)' cannot be inferred from the usage. Try specifying the type arguments explicitly

 

Error Line: ExecuteInsert(cn, null);

 

2. The type arguments for method 'IISU20.Common.Library.PersonResidenceBase<T>.ExecuteUpdate<P>(System.Data.SqlClient.SqlConnection, P)' cannot be inferred from the usage. Try specifying the type arguments explicitly.

 

Error Line: ExecuteUpdate(cn, null);

 

Is this a bug in CodeSmith templates? Any thoughts?

 

Thanks,

Kostya

Copyright (c) Marimer LLC