惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
罗磊的独立博客
SecWiki News
SecWiki News
The Register - Security
The Register - Security
The GitHub Blog
The GitHub Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Schneier on Security
IT之家
IT之家
博客园 - 聂微东
T
The Exploit Database - CXSecurity.com
Recorded Future
Recorded Future
大猫的无限游戏
大猫的无限游戏
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Vercel News
Vercel News
G
GRAHAM CLULEY
D
DataBreaches.Net
D
Darknet – Hacking Tools, Hacker News & Cyber Security
S
SegmentFault 最新的问题
博客园_首页
雷峰网
雷峰网
T
Tenable Blog
Spread Privacy
Spread Privacy
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
酷 壳 – CoolShell
酷 壳 – CoolShell
Cisco Talos Blog
Cisco Talos Blog
V
Visual Studio Blog
J
Java Code Geeks
博客园 - Franky
The Cloudflare Blog
Apple Machine Learning Research
Apple Machine Learning Research
C
CERT Recently Published Vulnerability Notes
T
Threatpost
Google DeepMind News
Google DeepMind News
F
Fortinet All Blogs
P
Privacy International News Feed
T
Threat Research - Cisco Blogs
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
Recent Announcements
Recent Announcements
Blog — PlanetScale
Blog — PlanetScale
Security Latest
Security Latest
U
Unit 42
M
MIT News - Artificial intelligence
Y
Y Combinator Blog
K
Kaspersky official blog
有赞技术团队
有赞技术团队
B
Blog
腾讯CDC

博客园 - 汗水房

window.open() 第2次进入不执行 page_load 中的代码 MicrosoftMiles: AJAX Updatepanel中保持Gridview的滚动位置 转载:Ajax中“Sys未定义”错误的解决方法 - 汗水房 - 博客园 CodeProject: 自定义控件实现Radiobox选择Gridview一行 翻译:LINQ to SQL N-层智能客户端 - 第一部分 构建中间层 插件开发时代 Adobe的RIA平台 使用Flash的数据可视化开发(Flash Data Visualization) 转载自Microsoft:每个开发人员现在应该下载的十种必备工具 转载:Google API简介 转载:移动widget玩玩可以 LINQ与Entity Framework以及其它新特性 转载LINQ to SQL(LINQ2SQL) vs. ADO.NET Entity Framework(ADOEF)-ccBoy版 LINQ to SQL建立独立的BLL实体层 LINQ in Action笔记 Architecting Your Data Access Layer with the Entity Framework | Architecting with .NET 转摘好文:Barry Gervin's Software Architecture Perspectives : The Entity Framework vs. The Data Access Layer (Part 1: The EF as a DAL) LinQ to SQL系统的层次架构设计 Linq-To-Sql Business Layer - 汗水房
LINQ to sQL:业务层多个Class Library,or 只用一个?
汗水房 · 2009-10-15 · via 博客园 - 汗水房

      在公司内部某系统的开发过程中,为了让公司里另外一个业余编程人员参与开发,在设计的时候特意考虑降低代码结构的复杂度。在实现业务层的时候,我告诉他对每一个单独的业务单元创建一个新的Class Library,在每个Class Library中建立自己的LINQ to SQL class(DBML)。

      现在发现这样的结构有一个问题,就是很难统一每个DBML文件所使用的的ConnectionString。因为都是单独设定的。虽然在网上包括MSDN、StackOverflow上看到了一些相关的问题,例如“Multiple LINQ to SQL Classes or one”?但是这些问题的前提都是多个DBML存在于一个Class Library中。

      我们的系统其实并不复杂,只使用了一个数据库,表格数目不超过100个。

      那么究竟是使用多个Class Library,还是一个呢?

I went to msdn and asked the question:

My ASP.net application uses only 1 sql server 2000 database and no more than 50 tables in it. And I copied an instance of the database to run on my develop PC, so I need to switch the connections between dev and release.
the problem is, i had created multiple class libraries in business layer, each class library has a LINQ to SQL class. now I find it difficult to make all dbml files in different projects use the same connection string. so is my design wrong? Should i only use 1 class library? then if remain to use multiple class libraries, how to ensure the same connectionstring is used when release?

      其实这个问题还是“业务层怎么实现”的问题。也就是说,我是不是考虑的太狭隘了,将原本不需要划分成多个class library Peoject的东西“琐碎”化了?

      (see question asked in CSDN)