I am making a Windows 10 app with an Azure backend which I started to integrate and when I try to retrieve data I am getting the most odd error, please see code below:
Code in App.xaml.cs
// Setting up a client to retrieve data, using localhost just to try it out public static MobileServiceClient DigestsTrackerClient = new MobileServiceClient("http://localhost:28451/"); Code on WeekItem.cs
// Method to get data from Mobile Services public static async void GetWeekItems(List<WeekItem> passer) { // Getting a InvalidOperationException down here IMobileServiceTable<WeekItem> weekTable = App.DigestsTrackerClient.GetTable<WeekItem>(); passer = await weekTable.ToListAsync(); } More information on the exception:
An exception of type 'System.InvalidOperationException' occurred in Microsoft.WindowsAzure.Mobile.dll but was not handled in user code Additional information: No 'id' member found on type 'TechDigest.Model.WeekItem'. Also, here is the model for the object that I am trying to retrieve:
public class WeekItem { public int WeekID { get; set; } public string Title { get; set; } public string ImageURI { get; set; } } This error really confusing since I basically copied the code from a demo made by an Azure engineer (18:50) and mine throws this weird exception, any help is greatly appreciated.