Exemplo n.º 1
0
 public UserModel LoginDetails(string firstName, string password)
 {
     try
     {
         Log.Information("File Name: " + _stackFrame.GetMethod().DeclaringType.Name + ".cs " + "NameSpace: " + _stackFrame.GetMethod().DeclaringType.Namespace + " Method Name: LoginDetails() ");
         var     userEntity   = _userRepository.LoginDetails(firstName, password);
         var     config       = _mapperProfile.MapperUserEntity();
         IMapper iMapper      = config.CreateMapper();
         var     userResponse = iMapper.Map <User, UserModel>(userEntity);
         Log.Information("File Name: " + _stackFrame.GetMethod().DeclaringType.Name + ".cs " + "LoginDetails() Method Executed Successfully");
         return(userResponse);
     }
     catch (Exception ex)
     {
         Log.Error("Error Message: " + ex.Message + " " + ex.StackTrace);
         throw;
     }
 }