Communication between BLL and DAL

前端 未结 4 1114
孤城傲影
孤城傲影 2021-02-06 08:10

Solution setup:

  • DAL (class library)
  • BLL (class library)
  • Common (class library (some common functionality - enums, logging, exceptions,...))
4条回答
  •  北海茫月
    2021-02-06 08:25

    In my opinion you should have another Layer (seperate dll). Like "domain", where would you keep all entities like Customer. Then simply include in all higher levels(DAL, BLL, UI and others) in hierarchy this assembly.

    Sample architecture can look like this:

    (Database) <-> DAL <-> BL <-> UI

    and on all levels you will have access to "domain" layer. DAL should return List not a DataTable. On some stage your development process you may want to use in DAL some OMR like NHibernate with would also return a List, probably.

提交回复
热议问题