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...Open Core Testi...Open Core Testi...Trying to write a Data Provider in C#Trying to write a Data Provider in C#
Previous
 
Next
New Post
9/19/2011 8:10 PM
 
I am not sure if it is possible to write a Data Provider in C#.  Here is the code I'm using, which should work.  My fallback will be to put it in App_Code in my module in VB if I have to:  This was the closest forum I could find which might be able to answer my question.

I know it isn't quite the right "fit" for the question but any others seemed even further afield.  Steer me in the right direction if I'm off the mark.

Here's my code:

namespace ISSI.DNN.NewVISSearchWebApp
{
    public abstract class DataProvider
    {
        #region "Static Methods"
        private static DataProvider objProvider = null;

        static DataProvider()
        {
            CreateProvider();
        }

        public static void CreateProvider()
        {
            objProvider = (DataProvider) DotNetNuke.Framework.Reflection.CreateObject("ISSI.DNN.NewVISSearchWebApp");
        }

        public static new DataProvider Instance()
        {
            return objProvider;
        }
        #endregion
 
New Post
9/19/2011 11:12 PM
 
Writing one in C# is no problem - there is fundamentally no difference (from a high-level "what you can achieve" standpoint at least) between C# or VB. The DNN core is now written in C# - so some great examples can be pulled out directly from the core.

Here is an example of the abstract implementation:
http://dotnetnuke.codeplex.com/Source...

Here is an example of the concrete implementation:
http://dotnetnuke.codeplex.com/Source...

Hope that helps,

Ian

Software Engineer
Co-Founder, dnnGallery
Stack Overflow: Ian Robinson
Twitter: @irobinson
Linked In: Ian Robinson
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Open Core Testi...Open Core Testi...Trying to write a Data Provider in C#Trying to write a Data Provider in C#


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