Esempio n. 1
0
        static void UserOperationFullStack()
        {
            User.User       user    = new User.User();
            User.UserDomain newUser = new User.UserDomain("ahmed", "*****@*****.**", "001", "ahmed",
                                                          "nasser", "fesal giza", 21, "male");
            user.insertUser(newUser);

            Console.WriteLine("******************* Done insert *******************");

            User.UserDomain userDomain = user.getUser("*****@*****.**");
            if (user.exist_or("*****@*****.**", "ahmed"))
            {
                Console.WriteLine("******************* user exist *******************");
                userDomain.printInYou();
                Console.WriteLine("******************* Done Get *******************");
            }

            userDomain.firstName  = "mohamed";
            userDomain.secondName = "ahmed";
            userDomain.printInYou();
            user.update(userDomain);
            Console.WriteLine("******************* Done update *******************");

            userDomain = user.getUser("*****@*****.**");
            if (userDomain != null)
            {
                userDomain.printInYou();
                Console.WriteLine("******************* Done Get *******************");
            }
            user.delete(userDomain.email);
            Console.WriteLine("******************* Done delete *******************");
        }