开发者

Functionality in a Data Access Layer formed by a dbml

开发者 https://www.devze.com 2023-01-01 07:04 出处:网络
I g开发者_如何学Pythonot a Data Access Layer that\'s being formed by one DBML in which i just include all object I need. Is it necessary to write more functionality in this dbml or can I just use the

I g开发者_如何学Pythonot a Data Access Layer that's being formed by one DBML in which i just include all object I need. Is it necessary to write more functionality in this dbml or can I just use the dbml as my DAL? I ask this because I am currently writing functionality to, for example, get all Articles from a Table in the Business Logic Layer. So I'm kind of lost now. What kind of examples can be given so that it's clear to me what to put in the Business Layer.


The Business Logic Layer is where you basically put your business rules and business entities. It is where you want to do things such as validity checks on making sure a user can add an Article, Edit an Article, Delete an Article, etc. The purpose is to centralize all your business rules and entities so that the Presentation Layer does not need to know about the underlining DB structure and that the DB structure is not defining the interface.

As far as if you need one you'll need to decide that for yourself.


http://www.microsoft.com/events/series/modernsoftdev.aspx?tab=webcasts&id=42420

Microsoft did a series of webcasts conducted by Joe Hummel on Modern Software Devevelopment with C#. There you will find a great deal about constructing a low level data-access layer and how it should interact with the business layer. I learn a lot from those lessons.. really good stuff.

0

精彩评论

暂无评论...
验证码 换一张
取 消