Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var connectString = ConfigurationManager.AppSettings["AzureStorage"];
            var storageHelper = new TableStorageHelper(connectString);

            //insert
            //var member = new Member("Hong", "Long2")
            //{
            //    Address = "HongKung",
            //    Phone = "123456"
            //};
            //var result = storageHelper.Insert("KyleTest", member);


            //query
            //var result = storageHelper.Query<Member>("KyleTest", x => x.PartitionKey == "Lin");
            //var data = result.data;

            //query first
            //var obj = storageHelper.Query<Member>("KyleTest", "Lin", "Hue");
            //obj.entity.Phone = "99999";
            //var result = storageHelper.Update("KyleTest", obj.entity);

            //delete
            storageHelper.Delte <Member>("KyleTest", "Lin", "Hue");
        }