Esempio n. 1
0
        public static void CreatedUser()
        {
            do
            {
                Console.WriteLine("Name: ");
                name = Console.ReadLine();

                Console.WriteLine("Last name: ");
                lastname = Console.ReadLine();

                Console.WriteLine("Age: ");
                age = int.Parse(Console.ReadLine());

                Console.WriteLine("Email: ");
                email = Console.ReadLine();
            } while (name == "" || lastname == "");

            PersonProfile person = new PersonProfile(name,lastname,age,email);
            db.User_profile.Add(person);
            db.SaveChanges();
        }
Esempio n. 2
0
        public static void CreatedUser()
        {
            do
            {
                Console.WriteLine("Name: ");
                name = Console.ReadLine();

                Console.WriteLine("Last name: ");
                lastname = Console.ReadLine();

                Console.WriteLine("Age: ");
                age = int.Parse(Console.ReadLine());

                Console.WriteLine("Email: ");
                email = Console.ReadLine();
            } while (name == "" || lastname == "");


            PersonProfile person = new PersonProfile(name, lastname, age, email);

            db.User_profile.Add(person);
            db.SaveChanges();
        }