TheBeerHouse读书笔记(一)

站点地图 Site map

why the Home node serves as root node for the others, and is not at the same level as the others. That would actually be an option, but I want the SiteMapPath control to always show the Home link, before the rest of the path that leads to the current page, so it must be the root node. In fact, the SiteMapPath does not work by remembering the previous pages — it just looks in the site map for an XML node that describes the current page, and displays the links of all parent nodes.

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode title="Home" url="~/Default.aspx">
<siteMapNode title="Store" url="~/Store/Default.aspx">
<siteMapNode title="Shopping cart" url="~/Store/ShoppingCart.aspx" />
</siteMapNode>
<siteMapNode title="Forum" url="~/Forum/Default.aspx" />
<siteMapNode title="About" url="~/About.aspx" />
<siteMapNode title="Contact" url="~/Contact.aspx" />
<siteMapNode title="Admin" url="~/Admin/Default.aspx" />
</siteMapNode>
</siteMap>

使用dataset还是自定义实体类Page51 -52

如果选择使用Dataset/DataTableDALBLL层之间传递数据, 就需要用ADO.NET中的方法来访问BLL中的数据, 如果选择自定义实体类,那么数据将被封装到自定义类和类的集合中。

Dataset/DataTable是可序列化的,从.NET 2.0开始

大多数人都认为DataSet/DataTable 对基于桌面的智能客户端应用程序来说是最好的选择,但对于可扩展的高性能Web网站来说,则不够强大。

DataSet/DataTable 的缺点可以分三类: 性能和扩展的局限性,数据的表示形式和业务规则验证。

 支持SQL依赖的缓存机制 Page 59 - 65

参考 http://mba.shengwushibie.com/itbook/BookChapter.asp?id=35564 

 (一)轮询(polling)和触发器:只能到表这一层上工作

  配置数据库

方法一:

aspnet_regsql -E -S ITWORX-PC -d FirstSolutionTest-ed

aspnet_regsql -E -S ITWORX-PC -d FirstSolutionTest-t product -et

方法二:

aspnet_regsql -C "Network Library=DBMSSOCN; Data Source=ITWORX-PC; Initial Catalog=FirstSolutionTest;Integrated Security=True" -ed

aspnet_regsql -C "Network Library=DBMSSOCN; Data Source=ITWORX-PC; Initial Catalog=FirstSolutionTest;Integrated Security=True" -et -t product

 

(二)SQL2005Service Broker/Query Notification 很多查询限制

2种方法适用于SQL Server, 只能用于SQL ServerDAL提供程序。

TheBeerHouse将缓存方法放在BLL中, 使用 Asp.net 1.x中基于时间、间隔过期(interval expiration)的缓存功能。

事务管理 transactionPage 65 – 69

Many business methods call multiple DAL methods internally to update, insert, or delete multiple records, potentially in multiple tables. You must ensure that multiple calls run within a transaction, so that if one fails, all actions performed by previous methods are rolled back.

 

using(TransactionScope scope = new TransactionScope())
{
   using (SqlConnection cn = new SqlConnection(connString))
   {
      cn.Open();
      SqlCommand cmd1 = new SqlCommand(cmdText1, cn);
      cmd1.ExecuteNonQuery();

      SqlCommand cmd2 = new SqlCommand(cmdText2, cn);
      cmd2.ExecuteNonQuery();
   }
   scope.Complete();
}

不推荐共享web主机上使用COM+, SWC或者System.Transaction, 因为不能控制服务器, TheBeerHouse不采用

创建Aspnetdb数据库

-A all|m|r|p|c|w

标识符影响

all所有功能

m成员资格

r角色管理

p配置文件

cWeb 部件个性化设置

wWeb 事件

 

Aspnet_regsql.exe  -E  -S   .\SqlExpress   -d  aspnetdb  -A  w

aspnet_regsql.exe -E -S localhost -A m -A p


 

转载于:https://www.cnblogs.com/jok141/archive/2011/08/24/2151839.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值