So I have DAO, DTO and BO. The result is the following code:
UserRepository rep = new UserRepository();
User user = rep.GetById(32).ToBusiness<User>();
user.ResetPassword();
user.OtherBusinessLogic("test");
user.FirstName = "Bob";
rep.Save(user.ToDataTransfer<Data.DTO.User>());
So, I am trying to separate the problems, but I want to get rid of the "converts" in this code. The "converters" are actually located at the business logic level (the DTO layer does not know anything about the business logic layer) as an extension object. The DTO itself, obviously, only stores data and does not have any business logic. UserRepository calls the DAO, and at the end GetById uses AutoMapper to map from the DAO to the DTO. "Converts" (ToBusiness and ToDataTransfer) performs exactly as they say.
My colleague thought that I might need a repository for the business, but he thought it might be a little awkward. Any thoughts?