azure table storage doesn t add new fields

0 votes
I made a table in Azure Table Storage and added a few records with my Entity class, which is inherited from TableEntity. After that, I added two more properties to this class and attempted to insert more records, but it appears that the new fields are not being put to the storage, and just the old data are being written and read. Is there something I'm missing? Do I need to do anything else to modify the arrangement of the table?
Mar 4 in Azure by Edureka
• 9,540 points
72 views

1 answer to this question.

0 votes

Add new properties in the class that you derived your entity from TableEntity class. Option1 and Option2 are new properties that you are trying to add:

 public class CustomerEntity : TableEntity
 {
        public CustomerEntity() { }
        public CustomerEntity(string lastName, string firstName)
        {
            this.PartitionKey = lastName;
            this.RowKey = firstName;
        }

        public string Email { get; set; }
        public string CellPhoneNumber { get; set; }

        public string Option1 { get; set; }
        public string Option2 { get; set; }    
    }
}

Make sure you set Option1 and Option2 values.

var customer = new CustomerEntity(LastName, FirstName)
{ 
    Email = Email,
    CellPhoneNumber = cellPhoneNumber,
    Optional1 = option1,
    Optional2 = option2,
}

TableOperation insertOperation = TableOperation.Insert(customer);
TableName.Execute(insertOperation);
answered Mar 4 by Edureka
• 8,060 points

Related Questions In Azure

0 votes
1 answer

Add run id when registering ml.azure model via python (pipeline)

Create the following resources in order to ...READ MORE

answered Mar 1 in Azure by Edureka
• 9,540 points
122 views
0 votes
1 answer

Azure Storage Account Geo Replication for File Shares?

Your storage account type is automatically converted ...READ MORE

answered Mar 24 in Azure by Edureka
• 9,540 points
71 views
0 votes
1 answer
0 votes
1 answer

Azure AzCopy command fail to copy csv files to Azure Storage

try using the below command: azcopy copy [source] ...READ MORE

answered Mar 24 in Azure by Edureka
• 9,540 points
212 views
0 votes
3 answers

Trying to upload files using Selenium(C#)

You can try using Javascript Executor to ...READ MORE

answered Aug 23, 2019 in Selenium by Abha
• 28,100 points
4,471 views
0 votes
1 answer

Deploy my Windows 10 IOT core application locally!

Of course, you, can! That is, in ...READ MORE

answered Jul 17, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
500 views
+6 votes
16 answers

How do backend of these really cool games work?

Most of the games these days don't ...READ MORE

answered Jul 19, 2018 in Career Counselling by Kalgi
• 52,350 points
7,264 views
0 votes
1 answer

How to add Azure Portal to myapps.microsoft.com

Steps to add Azure Portal: Sign in as an ...READ MORE

answered Mar 8 in Azure by Edureka
• 8,060 points
169 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP