How to configure EntityDataSource for Entity Framework v6 RRS feed

  • Question

  • This has been asked a few times but no answers have yet been provided.

    I am using EF6.1 in VS2013 to create a web forms app. I know I need to manually add the properties to the EntityDataSource, but have found no docs on how to do this. If I run my project without settings I get this message:

    The ObjectContext must be configured by 1) defining ContextTypeName, 2) defining both ConnectionString and DefaultContainerName, 3) defining ContextType, or 4) supplying it in the OnSelecting event.

    That gives some clues. I put it what I think to be the ContextTypeName and I get this error:

    Could not load type 'WebFrontEndTestDBContext'.

    Maybe I do not know what my ContextTypeName. How do I find out?

    So I tried to set the connection string, but it also wants a DefaultContainerName. I have no idea what that is or how to find out.

    In another post Rowan Miller says "We no longer recommend using the Entity Data Source for new projects." I cannot find what I am supposed to be doing instead.

    Monday, January 25, 2016 5:11 AM


All replies