|
Article relates to:
|
OpenAccess ORM
Q3 2011 or later
|
|
Created by:
|
Ivailo Ivanov
|
|
Last modified:
|
November 16, 2011
|
|
Last modified by:
|
Ivailo Ivanov
|
DESCRIPTION
A missing method of the OpenAccessContext can lead to a compiler error CS1061 if it is used by the client code. In case that method was representing a stored procedure call and its return type was
object[], the error is most probably caused by upgrading the project from an OpenAccess ORM version before Q3 2011 to Q3 2011 or a later release. The method had been auto-generated before the Stored Procedure Editor was released, but that generation is disabled by default in the latest version due to the new overlapping capabilities offered by the Editor.
SOLUTION
Switching on the old code generation for stored procedure methods will include the methods in the automatic code-generation again. Here is how this can be achieved:
1. Go to the folder where OpenAccess installs its templates:
(installation folder)\(version)\CodeGenerationTemplates\(language)\Includes
By default this is
(C#) C:\Program Files (x86)\Telerik\OpenAccess ORM\dsl2010\CodeGenerationTemplates\CSharp\Include
or
(VB) C:\Program Files (x86)\Telerik\OpenAccess ORM\dsl2010\CodeGenerationTemplates\VisualBasic\Include
2. Open the Context.ttincldue file with a text editor.
3. Change the value of the variable
generateClassicAPIMethods:
private bool generateClassicAPIMethods = false;
to
private bool generateClassicAPIMethods = true;
4. Save the template file
5. After doing that change, go to the Domain Model and save it in order to cause a new code generation
As a result, all of the old methods calling stored procedures will be auto-generated again with the same names and return types.
Please
Sign In
to rate this article.