I am using Entity Framework and calling a stored procedure as described here: http://msdn.microsoft.com/en-us/data/jj691402.aspx under "Accessing Multiple Result Sets with Code"
After executing the stored procedure I am using the ObjectContext.Translate method to get my results into a data contract object, which requires that the data contract properties match up to the data returned.
Is there any way I can use different property names, yet still have the Translate method map them correctly?
For example, I have a procedure for getting a list of countries, which returns the following columns: listID, listName. Instead of those names, I would like my data contract object to have just ID and Name.
I tried adding a Name parameter to the DataMember attribute, but that didn't work.
[DataMember(Name="listID")]
public string ID { get; set;}