问题描述
我已经看到了将业务逻辑移出数据访问层(存储过程,LINQ等等),并成为一个业务逻辑组件层(如C#对象)的趋势。
I've seen a trend to move business logic out of the data access layer (stored procedures, LINQ, etc.) and into a business logic component layer (like C# objects).
这被认为是正确的方式做这几天的事情?如果是这样,这是否意味着一些数据库开发人员职位可能有利于更多的中间层编码位置被淘汰? (即更多的C#code,而不是更长的存储过程。)
Is this considered the "right" way to do things these days? If so, does this mean that some database developer positions may be eliminated in favor of more middle-tier coding positions? (i.e. more c# code rather than more long stored procedures.)
推荐答案
数据访问逻辑数据访问层在所属业务逻辑属于业务层。我怎么看不到混合两种可能永远被认为是从设计的角度来看是个好主意。
Data access logic belongs in the data access layer, business logic belongs in the business layer. I don't see how mixing the two could ever be considered a good idea from a design standpoint.
这篇关于如果数据访问层包含业务逻辑是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!