Exemplo n.º 1
0
        private static void AddGuestEntity()
        {
            GuestEntity guestEntity = new GuestEntity("nono", "nonono");

            guestEntity.City    = "molando";
            guestEntity.Contact = "12334";
            TableOperation insertOperation = TableOperation.InsertOrReplace(guestEntity);

            table.Execute(insertOperation);
            Console.WriteLine("Entity Added!");
        }
Exemplo n.º 2
0
        private static void AddGuestEntityDyn()
        {
            Console.Write("Enter First Name: ");
            string fname = Console.ReadLine();

            Console.Write("Enter Last Name: ");
            string lname = Console.ReadLine();

            GuestEntity guestEntity = new GuestEntity(fname, lname);

            Console.Write("Enter City: ");
            guestEntity.City = Console.ReadLine();
            Console.Write("Enter Contact: ");
            guestEntity.Contact = Console.ReadLine();

            TableOperation insertOperation = TableOperation.Insert(guestEntity);

            table.Execute(insertOperation);
            Console.WriteLine("Entity Added!");
        }