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...Building ExtensionsBuilding ExtensionsModulesModulesHow to write Common/Global Code Between Modules (Using Database)?	How to write Common/Global Code Between Modules (Using Database)?
Previous
 
Next
New Post
7/16/2010 6:04 AM
 
Paul,

I take it that your "Global" DataProvider class is based on an example from the DNN MVC template, which I haven't used, so I won't comment on that. In any case the Instance() method is analogous to the one in the normal PA module template.

However, I don't get your "Calling" DataProvider. Do you want that to be able to access methods on the Global DataProvider? If so, all you need to do is add a reference to the Global assembly, and create an instance of the concrete dataprovider, like this:

DataProvider dataProvider = DataProvider.Instance();

With that object you can access all the data provider methods.

Alternatively, maybe I haven't understood your code / intention properly.


Paul Taylor
Dotcom Software Solutions Ltd
DotNetNuke, ASP.NET and SQL Server Development
 
New Post
7/16/2010 11:10 AM
 
Paul,

You are right. You didn't quite get the gist of what I was doing. I have Common (not from a MVC model, because there are no examples out there anywhere on how to do a global/common with a dataprovider). In fact what blog posts I have found on it said it is impossible because they both can NOT access separate SqlDataProviders. I, of course, do not believe this and my need to access two separate dataproviders (as mentioned above) is too great to take "no" for an answer. The Calling module's separate DataProvider (works fine) and the Common's separate dataprovider Instance code was provided above. As you can see they are the same, but the common is DIES on the line specified in the code above. This is pretty much what the other bloggers said would happen. What I need is a way around it. I need it to work. So, you are correct in that you missed the question and the code. Any help is still very much appreciated. 

Paul
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesHow to write Common/Global Code Between Modules (Using Database)?	How to write Common/Global Code Between Modules (Using Database)?


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