摘要:
上一篇文章介绍了如何实现一个通用的Insert操作, 即直接 Utility.Insert(xxx) 就可以实现了。那么, 大家可能就顺理成章的想到是否也可以实现通用的Update, Delete , Query 操作, 答案是肯定的!下面就让我们来对上一篇提到的DAL扩展一下: usingSystem; usingSystem.Collections.Generic; usingSystem.L... 阅读全文
摘要:
1. 建一个project 命名为DLinq ,添加一个Linq To SQL 的数据源,这里以经典的Northwind数据库为例,命名为NWDB.dbml。22. 建另一个Project 为DAL层 ,添加一个Table工厂, 这样我们就可以通过实体来获得Table usingSystem; usingSystem.Collections.Generic; usingSystem.Linq; u... 阅读全文