public static UserDTO UserToUserDTO(User user)
 {
     UserDTO userDAO = null;
     if (user != null)
     {
         userDAO = new UserDTO(user.UserID, user.UserLogin);
     }
     return userDAO;
 }
 private static UserDAO UserToUserDAO(User user)
 {
     UserKey userKey = user.GetUserKey();
     UserDAO userDAO = GetExistingUserDAO(userKey);
     if (userDAO == null)
     {
         userDAO = new UserDAO(user.UserID ,user.UserLogin);
         userDaoCollection.Add(userKey, userDAO);
     }
     return userDAO;
 }
 public static User UserDaoToUser(UserDAO userDAO)
 {
     User user = new User(userDAO.ID,userDAO.UserId);
     return user;
 }