I am using Sharepoint 2010 Data Services to create items on a table.
My table has a column called Priority which has High, Medium, and Low items in it.
When I try to create an item in this table via listdata.svc service in c#, Priority field value is not submitted, but the ticket is created on the server. My code is below:
TicketItem obj = new TicketItem();
obj.Title = "test";
IMGCustomerPortalDataContext dataContext = new IMGCustomerPortalDataContext(new Uri("http://server/site/_vti_bin/listdata.svc", UriKind.Absolute));
dataContext.Credentials = System.Net.CredentialCache.DefaultCredentials;
///Tried both of them
//obj.Priority = dataContext.TicketPriority.Where(k => k.Value == "Low").First();
obj.Priority = TicketPriorityValue.CreateTicketPriorityValue("Low");
dataContext.AddToTicket(obj);
dataContext.SaveChanges();
Is there anything I am missing?