Subsonic - Active Records 没有占据我所有的桌子
我有一个非常简单的数据库,包含 8 个表:
- 活动、
- 类、
- 公司、
- 计算机、
- 客户
- 、服务、
- 用户
- 、供应商
,但每当我包含 Subsonic 的 TT 文件时,它似乎只为我的两个表(类和客户)创建类。
这是什么原因,我该如何解决?
SubSonic 的配置:
const string Namespace = "SimpleTimerDatabase.Data";
const string ConnectionStringName = "SimpleTimerDatabase.Properties.Settings.QTimerConnectionString";
//This is the name of your database and is used in naming
//the repository. By default we set it to the connection string name
const string DatabaseName = "QTimer";
和我的连接字符串:
<connectionStrings>
<add name="SimpleTimerDatabase.Properties.Settings.QTimerConnectionString"
connectionString="Data Source=THESTUDIO\SQLEXPRESS;Initial Catalog=QTimer;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
I have a real simple database with 8 tables:
- Activities
- Classes
- Companies
- Computers
- Customers
- Services
- Users
- Vendors
but whenever I include the TT files for Subsonic, it seems to only create classes for two of my tables, Classes and Customers.
What is the reason for this, and how can I fix it?
Config for SubSonic:
const string Namespace = "SimpleTimerDatabase.Data";
const string ConnectionStringName = "SimpleTimerDatabase.Properties.Settings.QTimerConnectionString";
//This is the name of your database and is used in naming
//the repository. By default we set it to the connection string name
const string DatabaseName = "QTimer";
And my connection Strings:
<connectionStrings>
<add name="SimpleTimerDatabase.Properties.Settings.QTimerConnectionString"
connectionString="Data Source=THESTUDIO\SQLEXPRESS;Initial Catalog=QTimer;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
表格中是否存在差异? Classes 和 Customers 表是否配置了主键,而其他表则没有?
Are there differences in the tables? Do the Classes and Customers table have a primary key configured where the others don't?
Subsonic 不会对列名称进行任何检查,因此当我有一个标题为“class”的列和另一个标题为“1099”的列时,自动生成的代码无法编译,因为这些是无效标识符。
Subsonic doesn't do any checking of column names, so when I had a column titled "class" and another titled "1099", the autogenerated code couldn't compile because those are invalid identifiers.