Linq to sql(三):增删改(三)
2010-06-01 13:45
381 查看
前面创建Linq to sql Classes的时候我们输入名字GuestBook,系统就为我们自动创建了GuestBookDataContext (你也可以在GuestBook.Designer.cs中找到类定义)。在绑定的时候我们使用查询句法查询留言表中所有留言, 按照发表时间倒序(天哪?这是数据访问吗?好像仅仅定义了一句SQL啊)。在发表留言按钮中, 我们为一个tbGuestBook赋值,然后把它加入留言表,再提交更改,就这样完成了记录的插入。 运行效果如下图: 然后,再创建一个Admin.aspx,前台代码如下:
|
相关文章推荐
- 一步一步学Linq to sql(三):增删改
- 一步一步学Linq to sql(三):增删改
- 一步一步学Linq to sql(三):增删改
- 一步一步学Linq to sql(三):增删改
- 一步一步学Linq to sql(三):增删改
- 一步一步学Linq to sql(三):增删改
- Linq To Sql模式中自动生成T-SQL增删改操作系列~PropertyChanged事件实现在子类中记录属性的变化,在基类中进行统一处理
- 一步一步学Linq to sql(三):增删改 (非原创)
- 一步一步学Linq to sql(三):增删改
- 一步一步学Linq to sql(三):增删改
- LinqToSql--增删改
- 一步一步学Linq to sql(三):增删改
- linq to sql 之 增删改
- 一步一步学Linq to sql(三):增删改
- Linq to sql(三):增删改
- LInqToSql 增删改
- 【转】一步一步学Linq to sql(三):增删改
- 一步一步学Linq to sql(三):增删改
- 《深入了解 Linq to SQL》之对象的增删改 —— 麦叔叔呕心呖血之作
- Linq to Sql 学习系列之三 增删改