public User GetUserByName(string userName) { try { return this.userRepository.GetByName(userName); } catch (Exception) { return null; } }