I am getting an error while using the Entity Framework and C#.
I am trying to save any generic Entity with a line of code similar to the following:
objectContextInstance.AddObject(objectToSave.GetType().ToString(), objectToSave)
The error message I receive is:
The provided EntitySet name must be qualified by the EntityContainer name, such as 'EntityContainerName.EntitySetName', or the DefaultContainerName property must be set for the ObjectContext.
I do not understand this error because I have checked the Entity Data Model and verified that the DefaultContainerName has been set.
Can anyone provide any suggestions on how to troubleshoot this?