Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Entity Framework beta 3 connection string problemEntity Framework beta 3 connection string problem
Previous
 
Next
New Post
12/12/2008 10:39 AM
 

 Hi

I have a problem with connection string in Entity Framework beta 3 in my custom module. In portal web.config there is connection string called SiteSqlServer - it is connection string to database. So normallly e.g.: when I use LINQ to SQL I only set connection string to SiteSqlServer and there was no problem. But Entity Framework creates (during createing it) its own connection string(and adds it to web.config), but when I move my module to production server there is a problem because there is no Entity Framework connection string there. And my question is how to create this Entity Framework connection string so that it can be used on any portal (of course based on SiteSqlServer). Is it possible?

 
New Post
12/12/2008 11:08 AM
 

I have no experience yet using Entity Framework, but you might expect additional difficulties to support databaseOwner and objectQualifier using it.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
12/13/2008 1:39 PM
 

Hi Peter,

The ObjectContext base class, from which your entity-specific context class derives, exposes a constructor that allows you to specify a connection string at runtime (the parameterless constructor calls the base constructor with the connection string specified in the designer).  This will likely be your most immediate remedy to circumventing the issue you describe.  Alternatively, you might consider deploying your own entity connection string to the web.config (based off of the SiteSqlServer string) during module instantiation.  Both approaches have their advantages.

As Sebastian saliently articulates, you will continue to have issues with the object qualifier and database owner for DNN installations that utilize these features.  There exists no current workaround for this issue (to my knowledge).

I have as an element on my to-do list an adaptive approach to both of these issues; I was able to do so for LINQ to SQL, but have not yet done so in the L2E universe.  While there are some similarities, unique difficulties exist in the latter domain.

Hope this gets you pointed in the right direction.  Best of luck -- L2E in the DNN framework is very bleeding-edge stuff.

Brandon


Brandon Haynes
BrandonHaynes.org
 
New Post
12/13/2008 3:39 PM
Accepted Answer 

One way to do it is to build it on the fly, you can read more here .

I havent tryed to do it , just read it when playing around.

Jan

 
New Post
12/14/2008 3:10 PM
 

Hi Jan,

That's a great catch, and certainly part of any forward-looking DotNetNuke integrational implementation.

Brandon


Brandon Haynes
BrandonHaynes.org
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Entity Framework beta 3 connection string problemEntity Framework beta 3 connection string problem


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out