I'm starting C# and would like to know if there is any problem in approach below:
Briefly, in the layers there would be instances similar to the following:
UI
var userBll = _userBll.SaveUser(dtoUser);
BLL
// Validations and other business rules
return _userDal.SaveUser (dtoUser); // Request DAL
DAL
// Return the saved user to the database
return userDb;
Is there a problem with this kind of approach, in which the UserBll class would contain the "SaveUser" method? Would not it be correct to have a User class responsible for calling the Save method? Something like:
var user = new User();
user.SaveUser()
In this case would there be a redundancy between the User object class and the UserDTO data transport class?
Sorry if this may sound like a silly question, but it really confuses me.