"User code has not processed SqlException, Object Name & #39;

Source: Internet
Author: User

When the SubSonic3.0 template is used for generation, like Version 2.2, s (plural) is automatically added to the key to be used by similar databases. This is also a small Bug in version 3.0, during the query, because the plug-in does not completely remove s, an exception occurs, "user code has not processed SqlException, the object name 'xxxs 'is invalid." The query cannot be performed on tables with a complex number.

2.2 The processing will be simple. You can directly configure the SubSonicService tag in the config (configuration file), and set fixPluralClassNames = "false" in the add sub-tag in the tag, these configurations are not available after 3.0, so currently we can only directly modify the template.

 

First, open the SQLServer. ttinclude file and perform modification. In this way, you can remove the function of adding multiple numbers (s) in the generation process.

 

Then open the Objects. cs file in the Extensions directory of SubSonic3.0 source code, and process it as needed. In this way, you can remove the more complex values when querying.

 

After modifying the preceding content, you may be able to use the 3.0 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:

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.