Hopefully this is obvious, but... in the suggested namespaces below, you would replace
MyProject with the actual names of your company and project.
I would recommend using the same DTO classes across all layers. Fewer points of maintenance that way. I usually put them under a
MyCompany.MyProject.Models namespace, in their own VS project of the same name. And I usually name them simply after the real-world entity that they represent. (Ideally, the database tables use the same names too, but sometimes it makes sense to set up the schema a bit differently there.)
Dependencies: None (other than standard .NET or helper libraries)
My personal preference here is to use a one-for-one set of DAL classes matching the DTO classes, but in a
MyCompany.MyProject.DataAccess namespace/project. Class names here end with an
Engine suffix in order to avoid conflicts. (If you don't like that term, then a
DataAccess suffix would work fine too. Just be consistent with whatever you choose.) Each class provides simple CRUD options hitting the database, using the DTO classes for most input parameters and return types (inside a generic
List when there are more than one, e.g., the return from a
Also a one-for-one mapping here, but in a
MyCompany.MyProject.Logic namespace/project, and with classes getting a
Logic suffix. This should be the only layer that calls the DAL! Classes here are quite often just a simple pass-through to the DAL, but if & when business rules need to be implemented, this is the place for it.
If there's a web services API layer, I use the same one-for-one approach, but in a
MyCompany.MyProject.WebApi namespace/project, with
Services as the class suffix. (Unless you're using ASP.NET Web API, in which case you would of course use the
Controller suffix instead).
MyCompany.MyProject.Logic (never bypass this by calling the DAL directly!)
An Observation on Business Logic
It seems to be increasingly more common for people to leave out the BAL/BLL, and instead implement business logic in one or more of the other layers, wherever it makes the most sense. If you do this, just be absolutely certain that (1) all application code goes through the layer(s) with the business logic, and (2) it's obvious and/or well-documented where each particular business rule has been implemented. If in doubt, don't try this at home.
A Final Note on Enterprise-Level Architecture
If you're in a large company, or other situation where the same database tables get shared across multiple applications, then I would recommend leaving the
MyProject portion out of the above namespaces/projects. That way those layers can be shared by multiple front-end applications (and also behind-the-scenes utilities like Windows Services). But only do this if you have strong cross-team communication and thorough automated regressing testing in place!!! Otherwise, one team's changes to a shared core component are likely to break another team's application.