Solution setup:
- DAL (class library)
- BLL (class library)
- Common (class library (some common functionality - enums, logging, exceptions,...))
- Application1 (Windows Application)
- Application2 (Windows Application)
- WebApp (Web application)
- ...
Let's say I have a Customer entity, which is:
- a table in SQL server
- a CustomerDataTable in DAL
- a Customer class in BLL
- a BLL.Customer class in all the applications
What kind of objects should BLL and DAL use for communication - DataTable
or List<Customer>
(for example)? In first case, BLL logic should transform Customer object to DataTable and send it to DAL. In secod case, DAL layer should be aware of Customer class, which is in BLL layer. But originaly DLL references DAL and not opposite...
Should I put all classes into seperate assembly, which is referenced by all others (Common, BusinessObjects, ...)? In this case I could use Customer class in all my projects.
Should I even bother to seperate DAL and BLL when I know, that only one BLL will use my DAL. In this case I could merge them together into one project.
PS - I am reading about DataTables and a lot of people say that we shouldn't use them at all. What are better options? Maybe it is time for me to learn some ORM mapping tools :)