This question is probably most trivial to most but I am just getting started with EF 4 and can’t seem to assign my results from a stored procedure to my object. Is this possible?
List<GetRotationSummary_Result> currentPD;
RotationData myData = new RotationData();
currentPD = context.GetData(compId, roleId, email).ToList()
MyData = currentPD; // Can this even be done???
I want to store the data in the MyData object since users will have the ability to change the data. After which I would like to update the database. Completely open to any suggestions. Many thanks.
You can’t directly assign the objects like that since they are completely different types. You would need to create a function to do a field-by-field assignment of properties from
currentPDtomyData. A tool like automapper can make this much easier.