When testing the program in the morning, I used the Top attribute and did not expect to immediately throw a "not handled InvalidOperationException exception (syntax error near the keyword 'top')" error message. See:
Then Debug and find that TOP 100 is stuck with the following content, for example:
After modifying the plug-in code, we still encountered the same problem. We tracked the Code a little deeper and looked at the last generated SQL to find that the original TOP position was incorrect, I wiped...
Set the TOP file and location in the plug-in:
Use Debug to find the SQL generation template, as shown in :()
Add the {8} parameter (File Name: Sql2005Generator. cs)
Then modify the other location of the file :()
Next, open ANSISqlGenerator. cs and add the GenerateTop () function to it.
Find the GenerateCommandLine () function and comment out the code for setting TOP according to the image.
Then you can generate the plug-in again.
This article is original content. Keep the following information for reprinting.
As long as you want to learn and make progress together, if you are interested, you can add the Q group: SubSonic3.0 Learning Group (327360708) or Email to me (1654937 # qq.com ), I am very busy. If you have any questions, please leave a message first. Please forgive me for not replying in time.
For more questions about SubSonic3.0, refer to the blog: