Umbraco入门教程 - 添加并使用自定义的数据库表

by 亿答案 4. 十一月 2009 09:21

有时候需要保存自己的数据,这就需要用到新的表,用起来非常简单,只需在数据库中建好表和相关的存储过程等,直接用内置的ISqlHelper执行即可。代码如下:

using umbraco.DataLayer;
using umbraco;
。。。
            ISqlHelper helper = DataLayerHelper.CreateSqlHelper(GlobalSettings.DbDSN);

            helper.ExecuteNonQuery("update TestTable Set Id=@Id",helper.CreateParameter("@Id", 1));

GlobalSettings.DbDSN 会取得默认的数据库连接字符串。

Tags:

评论

2010/5/4 0:58:20 #

Steelers jerseys

信息是非常有用的..感谢分享

Steelers jerseys People's Republic of China

2010/5/4 1:01:16 #

cheap nhl jerseys

This is a really good read for me, Must admit that you are one of the best bloggers I ever saw.Thanks for posting this informative article.

cheap nhl jerseys People's Republic of China

2010/5/4 1:03:57 #

Gucci Sunglasses

You should really moderate the comments here

Gucci Sunglasses People's Republic of China

2010/5/13 8:57:16 #

高尔夫模拟器

博主的文章很精彩,mark一下

高尔夫模拟器 People's Republic of China

2010/6/6 6:53:41 #

cheap wholesale clothing

Color Overload usually covers a wholesale women's clothing line or designer and rarely strays from that genre. We don’t cover many videos here unless there is one that blows us away. Well….one just did. This may be a wholesale men's clothing video that you’ve seen on other t-shirt blogs because quite frankly, it should go on every t-shirt blog on the interwebs. It is that good! http://www.freewholesale.net

cheap wholesale clothing People's Republic of China

添加评论


(将显示你的Gravatar图标)

  Country flag

biuquote
  • 评论
  • 在线预览
Loading



Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

RecentComments

Comment RSS