I'm adding records to an Azure data using the following method on a button click.But I'm wondering is there a better way in terms of performance and scalability to submit the data to the database without creating new items for each new record?
This is how I'm currently submitting data to an Azure mobile service:
Item itemOne = new Item { Repititions = " " + fingersSpreadScoreCntr.ToString(), Date = " " + DateTime.Now.ToString(@"MM\/dd\/yyyy h\:mm tt"), User = "Ted Bundy" , Exercise = "Fingers Spread"};
await App.MobileService.GetTable<Item>().InsertAsync(itemOne);
Item itemTwo = new Item { Repititions = " " + fistHeldScoreCntr.ToString(), Date = " " + DateTime.Now.ToString(@"MM\/dd\/yyyy h\:mm tt"), User = "Joe Bloggs", Exercise = "Fist Held" };
await App.MobileService.GetTable<Item>().InsertAsync(itemTwo);
Item itemThree = new Item { Repititions = " " + waveOutScoreCntr.ToString(), Date = " " + DateTime.Now.ToString(@"MM\/dd\/yyyy h\:mm tt"), User = "George Bush", Exercise = "Wrist Extension" };
await App.MobileService.GetTable<Item>().InsertAsync(itemThree);