在亚音速部分类中添加新属性
我在 sqlserver 的表(活动)中添加了一个新列(创建日期)。 我正在使用 subsonic 2.0,如何将此列添加为 subsonic 部分类中的属性,以便我可以插入和更新“DateCreated”列的值。 DateCreated 将由用户从 GUI 提供。
以下是我正在使用的代码,但它插入 NULL &从数据库中检索 NULL。
public partial class ActivityInscription
{
public struct Columns
{
public static string IsInMixedList = @"IsInMixedList";
}
public bool? IsInMixedList
{
get;
set;
}
}
请任何人帮我解决这个问题。
I added a new column(DateCreated) in a table(Activity) in sqlserver.
and I am using subsonic 2.0, how can I add this column as property in subsonic partial class, so that I can insert and update the value of "DateCreated" Column.
DateCreated will be provided by the user from the GUI.
following is the code I m using but it insert NULL & retrive NULL from the database.
public partial class ActivityInscription
{
public struct Columns
{
public static string IsInMixedList = @"IsInMixedList";
}
public bool? IsInMixedList
{
get;
set;
}
}
Please any one help me to resolve this issue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您将该列添加到数据库中,则只需重建 DAL。它将拾取新列并将其添加到亚音速 DAL 中。在你的情况下没有理由进行部分类。如果表“Activity”是配置文件中表的亚音速列表(includeTableList)的一部分,则这将起作用。
If you added the column to the database then just rebuild the DAL. It will pick up the new column and add it to the subsonic DAL. There is no reason for a Partial class in your case. This will work providing that the table "Activity" is part of your subsonic list (includeTableList) of tables in the config file.
以下是我使用的解决方案,它正在工作:
公共部分类活动
{
}
现在它工作正常 &插入我从 GUI 提供的值。
Following is the solution, I used and it is working:
public partial class Activity
{
}
Now it is working fine & inserting the values that I provide from the GUI.