Which model mapper in a service for repository pattern

I have doubts about the repository pattern and the service layer.

To the Show level I have a controller that creates an interface from ViewModels DTO (View) and my EntityModels (DataLayer). It is correctly disconnected and Controller / Service works with correct models that use Mapper.

Example:

//Model DTO
class LoginRequestDTO {
   public Username { get; set; }
   public Password { get; set; }
}

//Entity Model
class LoggedUserEntity {
   public ID { get; set; }
   public Username { get; set; }
}

To the Service / Repository Levels I have doubts whether the service method needs to use an entity model (data-level) as an argument or another model (from my business layer) and then map BusinessModel to EntityModel

Example:

//Model DTO (came from another lib)
class User {
   public Name { get; set; }
   public OptionalValue { get; set; }
}

//Entity Model
class UserEntity {
   public ID { get; set; }
   public Username { get; set; }
   public GenericParameter { get; set; }
}

What should I do right?

Solution 1

Utility.cs
void execRoutine() {
    User user = someRoutineInAnotherLibs.getUser();
    var mappedUserEntity = Mapper.convertUserToUserEntity(user);
    serviceUser.saveUser(mappedUserEntity);
}


ServiceUser.cs
void saveUser(UserEntity u) {
    repo.insert(u);
}

Solution 2

Utility.cs
void execRoutine() {
    User user = someRoutineInAnotherLibs.getUser();
    serviceUser.saveUser(user);
}


ServiceUser.cs
void saveUser(User u) {
    var mappedUserEntity = Mapper.convertUserToUserEntity(user);
    repo.insert(u);
}

In Solution 1, I should provide a UserEntity to Service and insert the service directly into the DB.

In Solution 2, a user should be provisioned to the service, which converts from one model to another model and then inserts it into the database.

In any case, I do not need to know the implementation of User or UserEntity because I have a mapper who knows how to map a model to another model, so I think I will not break the SRP.