問題描述
我已經看到將業務邏輯從數據訪問層(存儲過程、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# 代碼而不是更長的存儲過程.)
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.
這篇關于數據訪問層是否應該包含業務邏輯?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!