Information générale
Catégorie:
The Mere Mortals .NET Framework
Titre:
Entity Framework and Connections
Hi,
I'm using the MM.NET 4.1 beta, but I think this applies to 4.0 as well.
I created a new "test" application and started playing with entity framework. (I hadn't touched EF before.) Now I'm encountering some confusion over the database connection properties in app.config. Namely the "key" element in the databases tag, versus the "name" element in the connectionStrings tag for Entity Framework.
Historically, the DatabaseKey property in ABusinessObject would contain a value from the databases tag which has been my ticket to the database connection. But now with Entity Framework, it looks like that same DatabaseKey property in ABusinessObject must now use the connectionStrings value in order to run. Do I understand that correctly? If so... then that raises some new questions.
1) Is the databases tag in app.config irrelevant if the app will use Entity Framework?
2) Is Entity Framework just a design-time thing? I thought it was. But that connectionString is full of EF information. If I need that at runtime, does my shipping application contain all that model information in the compiled assemblies? I'm confused at what EF is/does at runtime.
3) The MM.NET wizard created a connectionString with a name value of "EntityDataModelContainer." Should I be giving thought to a more real-world naming convention since this (might?) have meaning at runtime? Or is this generic name totally fine... and won't bite me in the ass later on -- in a real world application to be installed in production environments?
Thanks,
Guy
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement