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, 2022 in Azure by Edureka
• 12,690 points
857 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, 2022 by Edureka
• 13,620 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, 2022 in Azure by Edureka
• 12,690 points
910 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, 2022 in Azure by Edureka
• 12,690 points
844 views
0 votes
1 answer

Unable download large file from Azure Storage

If your download from the Azure Storage ...READ MORE

answered Mar 24, 2022 in Azure by Edureka
• 12,690 points
2,020 views
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, 2022 in Azure by Edureka
• 12,690 points
3,252 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,140 points
5,648 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
1,064 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,360 points
11,129 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, 2022 in Azure by Edureka
• 13,620 points

edited Jun 27, 2023 by Khan Sarfaraz 2,265 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP