每个表的新DAL / BLL类 [英] New DAL/BLL class for each table

查看:86
本文介绍了每个表的新DAL / BLL类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该为每个要在DB中访问的表创建一个新的DAL / BLL类吗?或者我应该制作一个可以处理所有内容的通用DAL / BLL类?



当我为每个表创建新的时,代码会有点重复,但它似乎比制作泛型类要好。

Should I make a new DAL/BLL class for each table that I want to access in the DB? Or should I just make a generic DAL/BLL class that can handle everything?

When I make new ones for each table, the code gets a bit repetitive, but it seems better than making generic classes.

推荐答案

我建​​议从功能角度对项目进行分组。例如。所有与身份验证相关的项目在一起,所有数据库加载相关的项目在一起等等。
I would recommend grouping items from a functional perspective. For eg. all authentication related items together, all database loading related items together and so on.


这篇关于每个表的新DAL / BLL类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆